Reducing image filesize without changing the print size (Draft)

Ask for help and post your question on how to use XnView MP.

Moderators: XnTriq, xnview

Posts: 3084
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Reducing image filesize without changing the print size (Draft)

Post by cday »

The basic method reduces the source image filesize by reducing the image pixel dimensions by a specified factor: for the Resize action, setting 50% for the height and width reduces the total number of pixels to 25% of the starting value, reducing the filesize. The original 'print' size is then restored to the starting value by using the Set DPI action to adjust the image DPI value to compensate before saving the image.

The 'print size' of an image is equal to the image pixel dimensions multiplied by the image DPI value: for example, a 1000px dimension in an image with a DPI of 100 measures 10 inches.

Note that the XnConvert (1.92) Resize action Mode > Mpixels when set to produce a different filesize changes the image pixel dimensions to unpredictable values, and not normally to round numbers, so is not suitable for the above method.

The attached 1000x1000px_100DPI PNG file can be substantially reduced in size using the above resize value of 50% for the image height and width, without changing the print size if the DPI value is adjusted to 50 DPI, and the resulting image is saved with the same compression options as the original file, see the file properties. The attached file has a print six of 10"x10" to make it easy to test.

Note that a PDF file does not have a DPI value until it is rasterised when opened in a software, at whatever DPI value is set in the software. To reduce the filesize by reducing the image pixel dimensions resulting when it is opened, while maintaining the print size, it is necessary to consider the DPI value used when the file was opened, and in this case use 50% of that value in the Set DPI action that follows the Resize action.

Note that when a PDF file is opened in XnView software (XnConvert, XnView MP, XnView Classic, NConvert...) it is rasterised at the DPI value set in the particular software instance. The default Ghostscript (the utility used to rasterise images in Xnview software) DPI value is 72. In the case of XnConvert, the DPI value actually used can be set on the Settings tab -- Load format settings... PS/PDF tab -- Resolution.

The attached 1000x1000px PDF file also has a print size of 10"x10" and can be resized to 25% the number of pixels, while maintaining the same print size if the DPI value in the output file is set to half the value at which the file is rasterised when it is opened: 150DPI if the file is opened at 300DPI, and
again suitable compression is used for the output file.

Screenshot - Resize.png

The following two test files are attached:
You do not have the required permissions to view the files attached to this post.