0
I'm trying to use the exiftool to set the DPI on a set of images to 300
I'm using the following command:
./exiftool -jfif:Xresolution=300 -jfif:Yresolution=300 filename.jpg
I've also tried:
./exiftool -Xresolution=300 -Yresolution=300 filename.jpg
When I query the dpi using exiftool I get the correct value:
Instead, when I query the file properties on Windows (right click, properties) or using the file
linux command I get different values:
JPEG image data, JFIF standard 1.01, aspect ratio, density 300x300, segment length 16, Exif Standard: [TIFF image data, big-endian, direntries=4, xresolution=62, yresolution=70, resolutionunit=1], baseline, precision 8, 1440x1152, frames 3
Windows shows DPI as 96x96
Are there any additional attributes needed to set?
1You could just ignore it altogether, as DPI means absolutely nothing until you print the picture, or set it in a page-layout app. btw
density 300x300
is 300 dpi. – Tetsujin – 2019-07-10T16:45:10.750Try running
exiftool -G1 -a -s -*Resolution
to see all the resolution tags that are in the file and what groups they are a part of. That said, when I run your first command on a file that doesn't have any resolution to start with, Windows shows the resolution as 300. – StarGeek – 2019-07-10T17:32:56.267