Page 1 of 1
Negative/Inverted color JPEG/PDF when converting from tiff
Posted: 2014-01-21T03:42:56-07:00
by acharyasatyendra
Hi,
I am using:
Version: ImageMagick 6.7.4-10 2012-01-25 Q8
http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
I get inverted colors jpeg images/PDF when i run following command:
convert.exe -limit memory 8192 -limit map 16384 -limit area 32768 -density 96 -colorspace RGB "C:\test\GE_course2.tiff[0]" -define pdf:use-cropbox=true +repage -quality 80 -strip -filter Lanczos -profile "C:\Documentum\CTS\AlterCast\required\color\sRGB Color Space Profile.icm" -colorspace RGB -resize 1280x300 C:\test\cache\GE_course2.tiff_pdf1q.jpg
or
convert.exe "C:\Documentum\CTS\docbases\satyendrad7\config\temp_sessions\6451096529106935167\GE_course2.tiff.tif" "pdf:C:\Documentum\CTS\cache\GE_course2.tiff-406323418.pdf"
I observed that the tiff I am using is have BitsPerSample as 16. With color depth of > 32-bits
Can anyone help as to why I get these inverted output in both PDF and JPEG?
Thanks,
Satyendra
Re: Negative/Inverted color JPEG/PDF when converting from ti
Posted: 2014-01-21T04:02:04-07:00
by snibgo
Does this occur with current versions of IM?
If so, please post samples of input files that show the problem. You can put them somewhere like dropbox.com and paste the links here.
Re: Negative/Inverted color JPEG/PDF when converting from ti
Posted: 2014-01-21T04:23:43-07:00
by acharyasatyendra
Snibgo,
No, this is not happening with 6.8.8 and another older version 6.6.3.
This happens only in 6.7.4. Anything specific that has changed in this version of IM?
I will attach the source and output to dropbox and paste the link here soon.
Thanks,
Satyendra
Re: Negative/Inverted color JPEG/PDF when converting from ti
Posted: 2014-01-21T05:36:17-07:00
by snibgo
Lots have things have changed, including bug fixes. See the change log in the directory of recent IM installation.
Re: Negative/Inverted color JPEG/PDF when converting from ti
Posted: 2014-01-21T10:56:23-07:00
by fmw42
Is your tif input CMYK? check from identify -verbose image.tif
Can you post a link to your tif file?
Re: Negative/Inverted color JPEG/PDF when converting from ti
Posted: 2014-01-23T21:27:34-07:00
by acharyasatyendra
Hi,
I have few tif files. Some are CMYK and some are sRGB colorspace.
Please find the tif input (sRGB) at
https://www.dropbox.com/s/fi5xrusi4yabl ... oPhoto.tif
Let me know if face issues accessing it.
Thanks,
Satyendra
Re: Negative/Inverted color JPEG/PDF when converting from ti
Posted: 2014-01-23T22:34:25-07:00
by fmw42
You should not be using both -colorspace and profiles in the same command. Using just profiles is best. This assumes that all your images have profiles.
This works for me under IM 6.8.8.2 Q16 Mac OSX.
Unix syntax:
convert -limit memory 8192 -limit map 16384 -limit area 32768 \
-density 96 PrinterEvaluationImage_V002_ProPhoto.tif[0] \
-define pdf:use-cropbox=true +repage -strip \
-profile /pathto/sRGB.icc \
-filter Lanczos -resize 1280x300 result.jpg
Windows syntax, I think
convert -limit memory 8192 -limit map 16384 -limit area 32768 ^
-density 96 "PrinterEvaluationImage_V002_ProPhoto.tif[0]" ^
-define pdf:use-cropbox=true +repage -strip ^
-profile "C:\pathto\sRGB.icc" ^
-filter Lanczos -resize 1280x300 result.jpg
Re: Negative/Inverted color JPEG/PDF when converting from ti
Posted: 2014-01-27T02:31:37-07:00
by acharyasatyendra
Hi fmw42,
I have also tested it with 6.8.8 and it works fine (with and without color space options, did not matter).
The issue occurs only in 6.7.4 version.
The issue even occurs for tiff -> pdf.
convert.exe "C:\...\GE_course2.tiff.tif" "pdf:C:\..\GE_course2.tiff-406323418.pdf"
Thanks,
Satyendra
Re: Negative/Inverted color JPEG/PDF when converting from ti
Posted: 2014-01-27T10:33:28-07:00
by fmw42
It is likely either a bug in your old version (and you will need to upgrade IM) or possibly an old version of libtiff on that old version and ( you may need to upgrade libtiff)
Re: Negative/Inverted color JPEG/PDF when converting from ti
Posted: 2014-01-28T22:15:01-07:00
by acharyasatyendra
Hi,
Yes it definitely is a bug as I can see that this issue does not appear in ImageMagick-6.7.5-5-Q16.
I will check internally on how to go about this now.
Also can you please help me with some guide to update libtiff?
Thanks,
Satyendra
Re: Negative/Inverted color JPEG/PDF when converting from ti
Posted: 2014-01-28T22:24:04-07:00
by fmw42
What platform? I use Mac only and use MacPorts to keep all my delegates updated and I install IM from source. If you are on Windows or Linux, I do not know how to install delegates on those platforms.
use
tiffinfo --version
to see what versions you have on both systems. Perhaps your older system needs an newer libtiff.
Re: Negative/Inverted color JPEG/PDF when converting from ti
Posted: 2014-01-30T00:38:26-07:00
by acharyasatyendra
I found out that this issue is fixed in 6.7.5-4 Q16. tested this.
Got the libtiff updated.
Appreciate your support guys

Thank you.
Thanks,
Satyendra