Discussion:
[pdftex] Possible bug in image inclusion, bug report site down
Marcel Korpel
2015-02-14 23:16:19 UTC
Permalink
Hi,

In the past days I tried to file a bug report at
http://sarovar.org/projects/pdftex/, as stated on the official home
page, but that site is unavailable, so I'll try to explain the issue
here.

The problem shows up when including images stored in CMYK colours
without specifying dimensions. Take a look at the following latex
source:

\documentclass{article}
\usepackage{graphicx}
\begin{document}
\includegraphics{test-cmyk300.jpg}
\includegraphics{test-cmyk72.jpg}
\includegraphics{test-rgb300.jpg}
\end{document}

Now please download the following images:
Loading Image...
Loading Image...
Loading Image...

After compiling the source, you'll see three images: two that are
quite large and don't fit the page, one that has a width of about four
times smaller than the other images.

When including another RGB picture at 72 DPI, you'll notice that it is
set the same size as both CMYK images. This means that the internal
resolution of CMYK images is not used, regardless of the DPI setting
the images are output at (about) 72 DPI. With RGB images, this bug is
not exhibited.

Kind regards,
Marcel
Martin Schröder
2015-02-15 01:13:06 UTC
Permalink
Post by Marcel Korpel
The problem shows up when including images stored in CMYK colours
without specifying dimensions. Take a look at the following latex
I think you have discovered that pdfTeX does not handle CMYK JPEG
files. This should be no wonder since JPEG is not equipped to handle
JPEG files (maybe it should warn about their usage).

Please convert your CMYK files to PDF.

Best
Martin
Martin Schröder
2015-02-15 01:32:55 UTC
Permalink
Post by Martin Schröder
JPEG files (maybe it should warn about their usage).
s/JPEG/CMYK/
:-)

Best
Martin
Marcel Korpel
2015-02-15 12:53:30 UTC
Permalink
Post by Martin Schröder
I think you have discovered that pdfTeX does not handle CMYK JPEG
files. This should be no wonder since JPEG is not equipped to handle
CMYK files (maybe it should warn about their usage).
Ah, I thought so, since Photoshop is able to store CMYK colours in JPEG files.
Post by Martin Schröder
Please convert your CMYK files to PDF.
Hmm, if I do so (with Photoshop), I can store the image with JPEG
compression in CMYK colours (table too wide for inclusion, see
attachment). Or should I choose ZIP compression in this case?

Anyway, thanks for the reply.

Regards,
Marcel
Martin Schröder
2015-02-15 13:18:58 UTC
Permalink
Post by Marcel Korpel
Post by Martin Schröder
I think you have discovered that pdfTeX does not handle CMYK JPEG
files. This should be no wonder since JPEG is not equipped to handle
CMYK files (maybe it should warn about their usage).
Ah, I thought so, since Photoshop is able to store CMYK colours in JPEG files.
https://en.wikipedia.org/wiki/JPEG_File_Interchange_Format
"However, Photoshop generally saves CMYK buffers as four-component
"Adobe JPEGs" that are not conformant with JFIF."

Best
Martin
Akira Kakuto
2015-02-16 14:24:35 UTC
Permalink
Post by Marcel Korpel
After compiling the source, you'll see three images: two that are
quite large and don't fit the page, one that has a width of about four
times smaller than the other images.
In r36291 in TeX Live repository, Exif is supported in writejpg.c
for pdfTeX in addition to JFIF, borrowed from sources in dvipdfm-x.
test.pdf created from the following source is attached.

%
% test.tex
% pdflatex test
%
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\includegraphics{test-cmyk300.jpg}

\includegraphics{test-cmyk72.jpg}

\includegraphics{test-rgb300.jpg}
\end{document}

Best,
Akira

Loading...