lossless change of dpi of a jpeg photo

Discussion in 'Digital Darkroom' started by anton_bredell, Aug 8, 2008.

  1. Hi There,

    Is there any freeware available to change the dpi (to 300dpi) without any loss of image quality? As far as I
    understand the dpi info is stored as EXIF in the image, and does not change the image properties, so it should be
    possible only to change the dpi of an image without resaving. If I do this in photoshop and resave, I think one
    will lose image quality. I just need to make sure my images do not degrade in quality. Any advice will be

    Thank you
  2. First of all. there are different location where the dpi value can be stored.

    - In a plain jpg-file (that doesn't contain an EXIF header), the dpi values are part of the jpg header itself.

    - In a jpg file that contains an EXIF header, this EXIF header can contain (but not necessarily contains) the dpi values.

    Most files you handle very likely have an exif header ... and for those files, you can use "exiftool" to modify the dpi values to your desire ... the tags will even be generated if they where missing in the original file ... anyhow, and this is important for you, the section containing the compressed image data is left untouched.

    exiftool -Xresolution=360 -Yresolution=360 *.jpg

    will change the dpi values of all files in the current directory to 360

    Get exiftool from ... http://www.sno.phy.queensu.ca/~phil/exiftool/

    Exiftool has no GUI (graphical frontend) ... you'll have to work with it on the commandline interface.
  3. I just rechecked ... exiftool can even handle those files without exifheader ... BUT ... when changing the dpi values, exiftool will add an additional small exif header to the file (containing the tags) AND it will update the values in the jpg-header.
  4. Thank you Rainer T,
    I really appreciate this information. This is exactly what I was looking for !
  5. I hope you can help. I have jpeg images without EXIF headers. When I use Exiftool to change the dpi (exiftool -Xresolution=300 -Yresolution=300 *.jpg) to 300dpi, Exiftool creates an exif header with this information. When I submit these images to photo libraries, they do not recognize the exif header, and uses the the dpi embedded in the jpeg-header. The problem is that Exiftool changes the previous dpi to 300, but only for images that had a pevious dpi value. Some of my images does not have a dpi value embedded in the jpeg header, and for these images Exiftool does not change the dpi to 300. When I open these images in Irvanview after using exiftool, it still shows no value for the dpi. Should I use exiftool in another way for these images?
  6. One can have a 2000x3000 pixel image tagged as 300 dpi and change it to a 2000x3000 pixel image at 100dpi and one has the same size image in pixels. Its like going to the bank with 500 bucks in 100's; and getting 500 bucks in 20's. Its still the same size file or number of dollars.

    Are you trying to resize an image to a different numeber of pixels or just re-tag the image to a different dpi tag?

    What is your goal?
  7. Irfanview does this too.
  8. Hi there, I am just trying to re-tag the image to a different dpi tag. (tis is required for submitting to some image libraries) If I do this in Irvanview, I have to resave the image which I do not want to do that with a jpeg. Using Exiftool (exiftool -Xresolution=300 -Yresolution=300 *.jpg)
    works perfect except for the images without any dpi value in the jpeg header. Any suggestions?
  9. Anton; with PS7; CS; CS2 and CS3 one can just open the file and just change the "dpi" and NOT resize the image. The header info shows up under "FILE INFO" under photoshop too. The drawback is if one has a jpeg to start with and one resaves it one may get a tad of degradation; depending on what the compression ratio the jpeg is one starts with.
  10. Any degrading of my jpegs (however slight) is what is what I am trying to avoid.

Share This Page