This project has moved and is read-only. For the latest updates, please go here.

TIF convert to pdf colour change


I have been trying to convert a TIF file in Lab colorspace to PDF format, but the converted file has the colors changed.

When converting to PDF, I end up with a file like [Tiff-Lab-300DPI.tif_ImageConverter.pdf]..

Note: I also do a bit of resizing before converting to PDF.

file attachments


dlemstra wrote Feb 4 at 10:10 AM

I can reproduce your issue. Changing the ColorSpace of the image to srgb solves the issue. I wonder why the PDF document is using the wrong colorspace. I will need to investigate this some more. I will come back to this topic when I have more info.

dlemstra wrote Feb 20 at 10:56 PM

I haven't found a cause for this yet. Will take another look in a couple weeks.

Aberdyne wrote Mar 6 at 1:22 PM

Hello, I had a similar issue while loading jpg image with CMYK colourspace. When I used them for compositing with other picture (RVB) colours seemed inverted... The TIFF image is saved in the LAB colourspace here so I presume it's the same problem.

Also I found this:

Apparently we need to convert colourspace to linear RGB (from any other colourspace including sRGB which is gamma corrected) BEFORE doing the reisze... can you confirm?

dlemstra wrote May 13 at 11:04 AM

We have made some changes to the PDF writer. Can you give it another try with the latest version of Magick.NET and test if that works for you?

M22an wrote May 29 at 12:18 PM


Just checked with the latest version ( am still facing the same issue. For now, I have added a check to change to sRGB if the colorspace is Lab and it seems to be working for me at the moment. Although I would like to remove such special handling in the long run.