Copy link to clipboard
Copied
There are a number of pages on the web that explain how to change the "resolution" in the metadata of an image without doing anything to the actual data. For example:
Quick Tip: How to Change the Pixels Per Inch of An Image in Photoshop — Medialoot
https://indesignsecrets.com/why-is-my-file-size-so-huge.php
Fine, but... none of them tell you how to save your file after you do that. When I try to save, the "JPEG Options" dialog pops up, and the quality setting does not have a "no change" choice or anything. No matter what quality number I choose, the projected filesize is never exactly what I started with, so I know it's resampling the image data. What am I missing?
Copy link to clipboard
Copied
JPEG is an image editor first, not a metadata editor, so it is set up to expect you did stuff to the image, and resave it. You probably need a specialist metadata tool. This is important for JPEG especially as each time you save the data is damaged more.
Copy link to clipboard
Copied
And by the way, it's recompressing NOT resampling.
Copy link to clipboard
Copied
Changing only the ppi makes very little sense. But if you want doing this and you are on Windows, you may use this program: https://www.sno.phy.queensu.ca/~phil/exiftool/
You have to know, that the ppi value is a irrelevant information in a picture. The only use I have for it is having Indesign generating correctly sized preview files.
Copy link to clipboard
Copied
That is exactly the application I need this for: placing the photos in InDesign and not ending up with a giant preview file (it's also nice to have the initial size of the photo be appropriate for the intended print resolution rather than starting out huge). I personally already use exiftool on Windows, but I'm advising a fellow member of a magazine design team, who uses a Mac and is more of an artist, not a geek - exiftool is cumbersome, and he already has Photoshop.
I was seeking clarification of what the two pages I linked seem to be saying. For example, the last sentence of my first link says:
You now have an image of the exact same quality and resolution, but the pixels per inch is now 300 instead of 72.
Sure, that's true, until you try to save it, and then you don't have the same quality. It seems that the instructions stop one step too soon.
Copy link to clipboard
Copied
ExifTool works great on the Mac OS and using Apple Automator it is “easy” to hide the command line stuff:
Copy link to clipboard
Copied
Oh, Stephen, you replied while I was writing a response to the previous dialogue. I have no idea how Mac stuff works, but I'll pass along your link to the guy I plan to advise - I don't know how techy he is, but perhaps he can figure it out.
Copy link to clipboard
Copied
Here is a simple command to change the PPI to 300. Only the metadata is changed, the binary image data is not changed:
exiftool -r -overwrite_original -IFD0:XResolution='300' -IFD0:YResolution='300' -Photoshop:XResolution='300' -Photoshop:YResolution='300' 'PATH TO TOP LEVEL FOLDER'
This code can also be put into a GUI right contextual click for easy of access in the Finder and one can use a variable for the PPI value, it does not have to be hard coded in as 300ppi:
/usr/local/bin/exiftool -r -P -overwrite_original_in_place -IFD0:XResolution="$@" -IFD0:YResolution="$@" -Photoshop:XResolution="$@" -Photoshop:YResolution="$@"
Then all one has to do is right click on a file or folder and select Services and the automator service action and then type in the required PPI value (there is no error checking, so make sure that a valid number is entered and nothing else).
And yes, my examples presumed that the value was inches, so if it is better to not presume then the following could be added to the code:
-IFD0:ResolutionUnit=inches -IFD1:ResolutionUnit=inches -Photoshop:DisplayedUnitsX=inches -Photoshop:DisplayedUnitsY=inches
Copy link to clipboard
Copied
Thanks! I'll pass the word along. My colleague is finished with his work on the current issue of the magazine, so he'll have a month or two to try out your suggestion. If it works, I'll mark your answer as "Correct Answer", because it addresses my objective in asking my question (apparently there is no good answer to the literal question - the instructions are simply wrong).
Copy link to clipboard
Copied
No, it's true. Ish. So long as you understand that every save of a JPEG causes damage. There is no possible change to the instructions to stop that.
Copy link to clipboard
Copied
https://forums.adobe.com/people/Test+Screen+Name wrote
No, it's true. Ish. So long as you understand that every save of a JPEG causes damage. There is no possible change to the instructions to stop that.
It's a good assumption, but it's not 100% true.
There should be no degradation by opening and saving a JPEG file again with the same program and the same quality parameter. Only: if there is a small change in the image (or a programming error, who randomizes some parameters), the JPEG compression will again shuffle bytes some other way and compression errors (the difference between the original and the saved image) will accumulate!
To be on the safe side, best is not to save as JPEG until all manipulations have been done.
What is needed here, is the program to change the exif data. There exists a GUI for the exif tool. I never used the exif tool as anyhow, when I get JPEG files, it's rare that I will use them as recieved. And then I save the file as a TIFF.
Copy link to clipboard
Copied
I am not convinced this is true. "There should be no degradation by opening and saving a JPEG file again with the same program and the same quality parameter. " JPEG compression has multiple parts: colour conversion to YCbCr, downsampling of the Cb and Cr components, quantitisation and entropy encoding. The JPEG specification defines the maths, but not the implementation, especially accuracy and rounding rules. None of these transformations is lossless. I don't understand the entropy encoding.
So, while I can imagine that certain JPEG implementations will be stable if used multiple times (stable meaning that a given image, compressed and recompressed often enough will eventually converge on a particular set of colours that remain the same), other implementations may see oscillating colours, or slow progression.
Copy link to clipboard
Copied
Plus, it would normally never be "opening and saving a JPEG file again with the same program and the same quality parameter" anyway. Images needing their ppi changed would not be coming from a save in Photoshop - they would be coming straight from cameras or the internet. Plus, even if the same person happened to have saved it with Photoshop and forgot to change the ppi, they would probably not even remember what quality setting they used the first time - it's not as if you can mine that number from the file somehow. I maintain that those instructional pages are at best misleading, and at worst just plain wrong.
As for the various GUIs written to use Exiftool, I tried a couple of the ones for Windows when I first discovered Exiftool several months ago, but there was some reason why they didn't work for me - I don't remember now, but perhaps they did not support the required Exiftool options -XResolution
, -YResolution
, and -ResolutionUnit
. So I built a batch file for myself with for %%a in ("%~1") do exiftool -XResolution=300 -YResolution=300 -ResolutionUnit=inches -P "%%a"
(which took considerable research to construct), but I have no idea how to do that for a Mac.
Copy link to clipboard
Copied
You're right! My assumption is not true. There is a degradation each time you open a JPEG file and you save that file again, using the same parameters. The degradation is, however, less then that of the second generation.
I once did a test with a high quality factor, and there the degradation was not perceivable. I redid now the test with a very difficult picture (hard edges) and the lowest quality factor and I get a change by each generation.
Copy link to clipboard
Copied
Thanks for the confirmation, it's an interesting theoretical problem (as well as a very real practical one!)