Forum How do I...?

Colour Management and preferred graphic format

davidpratten
I have some TIF files which are CMYK with embedded ICC profiles.

Q1) does Prince care if graphics are CMYK or RGB encoded? Does one give a better result?

Q2) does Prince preserve graphic's ICC profiles and incorporate them into the PDF or do they get discarded?

Q3) Concerning handling of tif and jpg files. Prince renders the following xhtml file into pdf

<html>
<body>
<img style="width: 100%;" src="earache_04.tif"/>
</body>
</html>

using a 957x816 4MB TIF into a 476KB PDF

Prince renders the following xhtml file into pdf

<html>
<body>
<img style="width: 100%;" src="earache_04.jpg"/>
</body>
</html>

using a dimensions 957x816 99KB JPG into a 641KB PDF.

So using a 30x smaller JPG results in a 1.5 times file size increase in the resultant pdf.

Could you please assist me in understanding how graphic embedding works in Prince/ PDF?

Thanks


David
mikeday
Hi David,

A1) Prince 5.0 does not support CMYK colors or CMYK images, only RGB images will be processed correctly at this point. However, we are planning to add support for CMYK to Prince, so it would be great if you could send us a couple of CMYK images that we could use for testing purposes :D

A2) Prince 5.0 does not support ICC profiles in images, so they will be discarded when the image is loaded and not included in the PDF file. Once again however, we would like to improve the support for color management in the future, so any feedback you can provide on this issue would be helpful.

A3) Prince 5.0 stores all images in the PDF output using deflate/zlib compression, regardless of the original image format. I suspect that the lossy nature of JPEG compression is introducing minor artifacts in the image that actually inhibit compression using the deflate algorithm, leading to the size blowout that you noticed.

In future, Prince will embed JPEG images in the PDF file directly to maintain their small size; only PNG/GIF/TIFF images will be compressed using the deflate algorithm.

Best regards,

Michael
davidpratten
Thanks Mike,

For the info on embedded images. Yes I suspect that you are correct about artifacts introduced into the JPG.

Actually the CMYK TIFs seem to come out OK on screen and print. Is there some specific reason why I should avoid CMYK TIFs?

David
mikeday
I'm not sure how the CMYK TIFF images are working, unless they also contain RGB data or are being silently converted to RGB by libtiff when Prince tries to load them. Beyond that, if they are working for you then there is no reason not to use them :D
jsweetman
Any ideas when Prince will be able to output CMYK images in CMYK format (as opposed to converting them to RGB)? This would be really useful for us. I have been using the cmyk function for colours in the CSS which works really well, but the cmyk images would also be useful!

As a side issue, perhaps you should think about putting your roadmap for Prince up on the website? Then we can see what exciting features are going to be implemented next!

<><

mikeday
We'll take a look at the CMYK images issue.

(By the way, for people reading earlier comments on this thread, Prince now embeds JPEG images into the PDF file as is, so there should be no surprising increase in file size any more).

The roadmap idea is a good one, we've just always been too busy working on new features to write down which new features we're working on. We plan to release Prince 6.0 next week, and I'll see if we can get a roadmap started for the next release then. :)
mikeday
We have an experimental roadmap up now, as described in this forum post.
mikeday
Today we have released Prince 6.0 rev 7, which includes support for CMYK TIFF and JPEG images.