doterax / guetzli-cuda-opencl

Perceptual JPEG encoder, optimized with CUDA&OpenCL, full JPEG format support.
Apache License 2.0
34 stars 4 forks source link

feature request: support for reading TIFF #2

Closed magicdoublem closed 3 years ago

magicdoublem commented 3 years ago

Support for reading TIFF would be a good thing to have. Can be left very rudimentary and limited to 8bit/no zip-compression, everything else doesn't make much sense for using it as an intermediate format to bake guetzlis.

doterax commented 3 years ago

Looks like libtiff is the best option.

magicdoublem commented 3 years ago

Looks like libtiff is the best option.

Yes, looks like a promising match.

doterax commented 3 years ago

I have just added TIFF support. If you can, try it and let me know what you think.

magicdoublem commented 3 years ago

I have just added TIFF support. If you can, try it and let me know what you think.

Wow, that was fast. It works just fine. I've tried 8bit, 16bit, with and without zip compression and all things worked smoothly.

I just get a "TIFFFetchNormalTag: Warning, Incorrect value for "RichTIFFIPTC"; tag ignored." warning every time. The tag isn't set, the files are coming straight out of LRc.

doterax commented 3 years ago

I just get a "TIFFFetchNormalTag: Warning, Incorrect value for "RichTIFFIPTC"; tag ignored." warning every time.

Could you provide example TIFF file for investigation?

magicdoublem commented 3 years ago

I just get a "TIFFFetchNormalTag: Warning, Incorrect value for "RichTIFFIPTC"; tag ignored." warning every time.

Could you provide example TIFF file for investigation?

I narrowed it down to the files for which I used a metadata-preset to set things like copyright-fields. Here's the same tiff with and without that kind of metadata. The one with it gives the error I mentioned above, but encodes fine. test_tiffs.zip

doterax commented 3 years ago

This warning is not harmfull. And was supressed in non verbose mode.