# Embedded png-Images still result in small pdf-fielsize

I read much about embedding images and screenshots the correct way in the last few days to avoid skewed or blurry texts in the screens.

I embed them like this:

\begin{figure}[htb]
\centering
\includegraphics{blaa3.png}
\caption{....}
\label{fig:....}
\end{figure}


using png uncompressed files. I set the DPI to a multiple of 72 so that it does fit well on the page (for bigger images I'm choosing higher DPI numbers so that it does fit on the page without the need of scaling \includegraphics[scale=0.5]{blaa3.png} so to not make it blurred. The strange thing is: When Im changing the DPI, the default DPI being displayed is 96, so should I rather chose a multiple of 96 instead of 72!?

Okay and here comes the main question: I read somewhere on tex here that the PNG files are embedded as they are without actually being compressed etc. Now my uncompressed PNG files have about 3MB and I'm wondering why the resulting PDF file (embedding like 5 of those pngs) is only about 6MB in size!? So they are obviously being compressed, aren't they?

Using latest TeCnicCenter with MiKTeX and TeXify for outputting under Windows 8.1.

Almost every PDF generator optimizes PDF documents for size. I think PNG images are compressed using your configuration but they are done so using lossless compression so no quality is lost.

.zip files are a good example of lossless compression, they are smaller than the original files but do contain all information.

Regards,

Ernst Jan

• And why then Photonshop or IrfanView doesn't do this on its own when exporting to lossless PNG when it's obviously possible to further compress them? Or this compression only applicable in PDF because the PDF-viewers understand how the images are compressed, and maybe image viewers wouldn't!? – tim Jan 15 '14 at 10:23
• I think because of the definition of the PNG format. In your pdf file the PNG's are stored in the PDF and not as seperate PNG files anymore, so no longer requiring the compatibility with the PNG format – EJG89 Jan 15 '14 at 15:54
• Yes that's what I thought as well (maybe couldn't describe it as perfect as you did :-)) – tim Jan 15 '14 at 15:55
• Edit: Are you sure about it or or do you assume that? :-) – tim Jan 15 '14 at 16:06
• A clear 'I think' ;-). PDF is not stored like .docx which can be opened with any program handling .zip files to reveal how the images are truly stored. – EJG89 Jan 15 '14 at 17:49