UCSCLibrary / dams_project_mgmt

DAMS purpose is to provide access to digitized and born-digital UCSC Special Collections content. This repository is used for project planning. It holds the task tickets and roadmap for the different projects under DAMS.
2 stars 0 forks source link

Use ImageMagik to create JP2K derivatives for JPEGs #538

Open bkiahstroud opened 2 years ago

bkiahstroud commented 2 years ago

Summary

This ticket is based off discussion documented in these meeting notes

Currently, whenever a JPEG file is uploaded into the system, its derivatives fail to be created. This leads to the image failing to display inside the Universal Viewer and other places throughout the app. This is because the system is currently fine-tuned to only support JP2K derivatives. Kakadu is installed in the system for the purpose of creating JP2K derivatives, but only works for TIFF files.

We need to use the ImageMagik library to generate JP2K derivatives for JPEG files.

Acceptance Criteria

bkiahstroud commented 2 years ago

Related: #504

bkiahstroud commented 2 years ago

Currently seeing this error on sandbox after the PR was deployed:

RuntimeError (Unable to execute command "kdu_compress -quiet -i /tmp/sufia20220603-31878-1u0a866.jp2 -o /tmp/sufia20220603-31878-1eob5ht.jp2 -rate 2.4,1.48331273,.91673033,.56657224,.35016049,.21641118,.13374944,.08266171 -jp2_space sRGB -double_buffering 10 -num_threads 4 -no_weights Clevels=6 Clayers=8 "Cblk={64,64}" Cuse_sop=yes Cuse_eph=yes Corder=RPCL ORGgen_plt=yes ORGtparts=R "Stiles={1024,1024}"". Exit code: pid 2194 exit 127)
Error message: sh: kdu_compress: command not found

Need to determine why the sever doesn't seem to be able to find the kdu_compress script. I'm coordinating with @snehagunduraoUL with possibly doing a rollback to investigate if the most recent code merge is responsible.

snehagunduraoUL commented 2 years ago

This kdu_compress error does not exist after reverting the code. http://digitalcollections-staging-sandbox.library.ucsc.edu/importers/167?locale=en