harvard-lts / kakadu-vips

Kakadu JP2 reader and writer for libvips
Apache License 2.0
3 stars 0 forks source link

fix tlm support #8

Closed jcupitt closed 5 months ago

jcupitt commented 5 months ago

tlm needs target rewrite

see https://github.com/harvard-lts/kakadu-vips/issues/5

jcupitt commented 5 months ago

Test with eg.:

$ vips kakadusave k2.jpg x.jp2 --options "Qfactor=90 Cmodes=HT ORGgen_plt=yes Creversible=no Cblk={64,64} ORGtparts=R ORGgen_tlm=9"

** (vips:38242): WARNING **: 17:23:15.321: Kakadu Core Warning:
The `Qweights' parameter values supplied are not a close match to the
square-root of the synthesis energy gains of the prevailing multi-component
transform, if any, in tile 0.  Use the following parameters: 1.732051,
1.805108, 1.573402.

There's a test in the test suite too.

scossu commented 5 months ago

This seems to work now—at least it creates a JP2 with no warning. Do you know how I can inspect the image for the TLM marker?

jcupitt commented 5 months ago

Sorry, I'm not sure. You can see that the bytes in the file change with this option, maybe that's enough?

scossu commented 5 months ago

I guess we'll merge this in for now, maybe I can ask the Kakadu devs if there are specific metadata flags to detect these features.