Open symac opened 7 years ago
@symac ,
I used GraphicsMagick and ImageMagick for both the JP2 and the TIFF file. I am fairly sure that both images have the same 'dark' color. Or I am 'color-blind'.
The first difference might be: I used openjpeg of today (2017-11-05). The second difference might be: tiffinfo B335222107_10_13_10_05_001.tif
<?xpacket end="w"?>
Photoshop Data:
'converttif.c' ignores an ICC Profile in TIFF files.
Q1. Which openjpeg library did you use? Q2. Which image program did you use for the TIFF file, the JP2 file and the PNG files?
winfried
Hi symac
_Is this an issue with the software or an issue with the way I am running it? My original tiff seems not to be well formatted as it produces an issue with opjcompress : TIFFFetchNormalTag: Warning, Incompatible type for "RichTIFFIPTC"; tag ignored so that might be an explanation but I can't understand the link between this message and my colour error. It all depends on how you use the viewer. Does the viewer recalculate the ICC parameters or call the colormatrix sRGB constant. This is particularly noticeable for 16bit photo files with colormatrix larger than bt709. As for Exif, XMP, IPTC data. Errors are in the free software libtiff. When you buy a paid converter for JPEG2000, all this data will be transferred to JP2, and the ICC profile will be converted to info colormatrix in the JP2 container.
@szukw000 :
It has been compiled against openjp2 library v2.1.0.
is this the info you were asking for ? @Jamaika1 this project is my first try with JP2, I am not aware of all these details and that might explain what is wrong then. Is there no way to get a JP2 picture that is exactly the same as my TIFF source file using only Open source tools?
@symac , I try to use always the latest library version (bug repair). This means I use openjpeg-2.3.0.
Using gimp-2.8.22 with LINUX I get:
gimp B335222107_10_13_10_05_001.jp2
WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!! YOUR CODE IS RELYING ON DEPRECATED FUNCTIONALTIY IN THE JASPER LIBRARY. THIS FUNCTIONALITY WILL BE REMOVED IN THE NEAR FUTURE. PLEASE FIX THIS PROBLEM BEFORE YOUR CODE STOPS WORKING! The specific problem is as follows: negative buffer size for jas_stream_memopen
Using IrfanView with WIN7 it seems there is no difference between TIF and JP2.
winfried
The problem is that the TIFF image has an embedded ICC color profile (Adobe RGB) and opj_compress fails to transfer the display profile from the source image (the TIFF with the Adobe RGB profile) to the output JP2 image.
Instead, _opjcompress mistakenly tags the output JP2 file with an sRGB profile -- JPEG2000's default, 'enumerated', color profile.
I just posted an issue on this same topic. See: 1058
Trying to convert files from tiff to jpeg2000 using opj_compress I have an issue regarding the colours produced. My source file is B335222107_10_13_10_05_001.tif (~19Mo) and I am running the following command :
opj_compress -i B335222107_10_13_10_05_001.tif -o B335222107_10_13_10_05_001.jp2
The file I get, B335222107_10_13_10_05_001.jp2 (~12Mo) seems to be different than the original even if I expect a lossless conversion by using this command. When looking at both images (left is JP2, right is TIFF), one is darker than the other:
Is this an issue with the software or an issue with the way I am running it? My original tiff seems not to be well formatted as it produces an issue with opj_compress :
TIFFFetchNormalTag: Warning, Incompatible type for "RichTIFFIPTC"; tag ignored
so that might be an explanation but I can't understand the link between this message and my colour error.