Why does LO5.1.4 Writer "PDF export" don't compress PNG images if JPEG compression is enabled?

I exported a LO Writer document with added PNG images (300dpi fullsize A4 image) to PDF with JPEG compression enabled, but filesize was always very high and the images were saved lossless inside the PDF file.
Then i converted the PNG files to JPEG (resolution untouched, quality 90%) and created the Writer document again with this JPEG files added. Now i exported the document again to PDF with JPEG compression enabled and now all worked like expected, also the JPEG quality option.
I always thought JPEG compression option inside the PDF export function is for all images, no matter what datatype they had at the time they were added to the document.
This means i always have to convert images to JPEG before i can add it to the document, if i later want to export a small PDF file.

PNG files are already compressed and cannot be compressed further.

  1. ALWAYS use JPG files for photos.
  2. NEVER copy and paste a photo into a document as LO does not know what format the original image was in and will (correctly) save it as a PNG to ensure no data loss.
  3. ALWAYS add photos by Insert > Image …
  4. NEVER use PNG for photos as a PNG file will typically be 3x bigger than the JPG
  5. ALWAYS use PNG (or TIF or GIF) for graphics (ie not photos - things like clip art, diagrams, anything with text etc).
  6. NEVER use JPG for graphics as it blurs edges and makes text very poor.
  7. NEVER use BMP as it is uncompressed.
  8. A 6 million pixel image from a camera is typically 3,200 pixels wide which is usually far too many pixels for for most purposes. Decide what resolution you require for the final document. If the image
    will be, say, 3 inches wide on paper and you
    are printing at 150 dpi (very good
    quality) or 300 dpi (excellent
    quality) or 600 dpi (superb quality)
    the the image needs to be 3 x 150 =
    450 pixels wide for 150 dpi printing; 3 x 300
    = 900 pixels wide for 300 dpi; and 3 x 600 = 1800 pixels wide for 600 dpi
    printing. If the image will be viewed on screen, what is the screen resolution? A high definition 15.6" wide laptop screen typically has 1,366 pixels - there is no point in your image being higher resolutions than this.
  9. Do all image processing in an image editor before placing the image in the document. LO is not a good image processor when compared with proper image processors. Resample images to reduced resolutions with a graphics editor like the free IrfanView (simple to use) or GIMP (more powerful and much more difficult to use).
  10. JPG files use lossy compression where data is lost. PNG files use lossless compression where no data is lost. Google JPG lossy compression and PNG lossless compression for more information.
  1. Wrong, not always, but generally when the photo doesn’t have high value, otherwise PNG or even TIFF.
  2. Not fully true.
  3. Krita is supposed to be superior to GIMP as far as features go, at least. Also, GIMP has hardly any development (and it’s 1 person) as much as it sucks to say it. I’ll have to check Krita out at some point …

WRONG??? NOT FULLY TRUE??? What on earth are you talking about? I suggest you need to do some research.

JPG was designed by the Joint Photographic Experts Group specially for PHOTOS. It uses a lossy compression which sacrifices minor details, almost imperceptible to the eye, for a reduced file size. It is designed for, and ideal for, PHOTOS.

PNG was designed for GRAPHICS where adjacent pixels are likely to have the same [R,G,B] values. It uses a lossless compression which is almost useless for photos where there are few contiguous areas having the identical pixel [R,G,B] values so the PNG compression algorithm cannot compress them. A PNG file of a photo will be anything from 3x to 10x or more bigger than a JPG file.

The converse is true too. Using JPG for graphics is very bad as JPG compression adds artefacts to the image to assist in compressing it. These artefacts are imperceptible in a photo but they destroy quality in a graphics image

^ Yes, not fully true. I know from experience that GIMP has various options to decrease JPG size (and has internally improved it), and while PNG (let alone TIFF) will surely be much bigger depending on how much content the pic has, that’s a price you’ve to pay when you want the complete quality that JPG at 100% doesn’t give. Also, I think GIMP has improved its PNG sizes along the years. Also, GIMP has had a decent dev cycle since a year or 1½ after my 2017 comment, it’s doing pretty good, GIMP 3.0.0 should be pretty glorious by comparison to 2.x.x when it hits. Outside GIMP, there’re tools for any OS which have their specialized algos which improve JPG and PNG (dunno about TIFF) sizes without touching the quality or compatibility, if one’s really concerned about space.

Additionally to very good suggestions given by @JohnHa, you also may use LO’s in-built “Compress…” feature available by right-click on specific inserted image. Of course, it’s not that convenient as a global export option would be, but in case of already existing documents, it may be much easier than going through all required steps to prepare images in an external application, e.g. it keeps on-page size and position when down-sampling.

Thank you for the hints. I never recognized the compress feature in the image menu.