How to determine the image type for optimization settings?

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

User avatar
Jensen Head
User
Posts: 637
Joined: Mon Sep 13, 2021 8:12 am

How to determine the image type for optimization settings?

Post by Jensen Head »

I want to reduce the size of documents by reducing the size of images and recompressing them. I determined which images need optimization. In the properties of these images, I see something like this:
Image Details
Width: 4872
Height: 7000
Type: Image
BPC: 8
Compression: JPEG, ZIP
Color Space: DeviceRGB
Mask Type: None
Object Number: 18
Layer: None
In the "Optimize PDF" window, on the "Images" tab, I see sections like this:
  • Color Images
  • Grayscale Images
  • Indexed Images
  • Monochrome Images
How do I map image information to sections in the Optimize PDF window? Wouldn't it be better to display in the properties of images which of the four categories of the optimizer they belong to?
User avatar
Paul - PDF-XChange
Site Admin
Posts: 7388
Joined: Wed Mar 25, 2009 10:37 pm

Re: How to determine the image type for optimization settings?

Post by Paul - PDF-XChange »

Hi Jensen Head,

on asking the devs aboput this I was told the following:
In the user's case it is, most likely, Color Image.
But in general, cases detecting the image type might be time consuming and make showing/collecting properties a bit slow.
Because even 24 bits per pixel image may have just two colors (or be completely solid, one color). So, to detect the type we have to decompress image, and count colors. If number of colors > 256 -- it is color image;
otherwise, if all colors are shade of gray -- it is grayscale image;
otherwise, if number of colors > 2 - indexed
otherwise, if two colors we have are black and white - it is monochmore; index otherwise :)

but I do agree, for users it might be useful. Please make a FR and we will see how we can do that efficiently.
So your ticket is: RT#6396: Feature Request : Editor :: Improvements in passing image properties to the Optimization tools

We will do what we can to improve this.
Best regards

Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com