Reducing the pixels-per-inch (PPI) of an image results in same file size

69 Views Asked by At

Summary

I'm attempting to use ImageMagick to produce copies of an image with a range different pixel densities to increase the user-experience of my front-end projects.

Problem

After running the script, the respective PPI is successfully converted but I am expecting the file sizes to be different, as detail is being removed and based on prior research from this article, but they are all the same (or similar).

Base case

The base file has the following identity stats:

File: Image.JPG
 Resolution: 4896x3672
 PPI: 300,300
 Size: 7018920B
---------------------

Steps to reproduce

I run the following commands:

convert Image.jpg -density 144 -units PixelsPerInch Image_2x.jpg
convert Image.jpg -density 72 -units PixelsPerInch Image_1x.jpg
convert Image.jpg -density 4 -units PixelsPerInch Image_0x.jpg

Results

Then I check the identity stats once again with the following output:

File: Image.JPG
 Resolution: 4896x3672
 PPI: 300,300
 Size: 7018920B
---------------------
File: Image_2x.jpg
 Resolution: 4896x3672
 PPI: 144,144
 Size: 7019690B
---------------------
File: Image_1x.jpg
 Resolution: 4896x3672
 PPI: 72,72
 Size: 7019690B
---------------------
File: Image_0x.jpg
 Resolution: 4896x3672
 PPI: 4,4
 Size: 7019690B
---------------------

We can see that the PPI has changed for each respective image but the file sizes are all the same.

0

There are 0 best solutions below