Hello
for the internal control IMAGE, would it be possible to add the argument DPI, in order to change the quality of the image.
cordially
DPI metadata within PNG and JPEG images is very rarely used by anything. Most software completely ignores it (with good reason, since almost no software writes anything meaningful into the DPI fields). GIF and BMP don't have DPI metadata at all.
Are you sure you want to change the DPI values (which are literally just two numbers inside the image, saying how large the pixels should be in the physical world)?
Or do you want to resize the images; i.e. change how many pixels they have? (The image
command can already do that.)
Yes, it's actually for image resizing intended for poster printing. For the moment, I realize this operation with PAINT.net 4.1.5, which also proposes me the centimeter, for the resizing of the images. If DOPUS could do this batch work, it would be wonderful.
cordially
You could create an Opus button which automates it using a command-line tool like ExifTool. With that you'd select the files you want to change and click the button to make the change.
Assuming we're talking about JPEG files, and based on this thread:
It looks like the command in Opus would be like this:
"C:\Program Files\ExifTool\ExifTool.exe" -jfif:Xresolution=300 -jfif:Yresolution=300 {filepath$}
Or possibly:
"C:\Program Files\ExifTool\ExifTool.exe" -Xresolution=300 -Yresolution=300 {filepath$}
Changing the two 300
in each command to the DPI you want, of course.
ImageMagick is another command-line tool which can do this, but it seems to want to re-compress the JPEG data, which isn't good if you just want to edit the DPI tag. (Maybe there is a way to tell it not to, but using ExifTool seems easier.)
Great solution, Leo. I'd been hoping for something like that. Thank you.
It's surprising the number of applications that do use the dpi in order to decide how to display images.
Quick tip: if you don't want exiftool to create backups of each file, add the -overwrite_original_in_place
option like so:
"Path\To\exiftool.exe" -overwrite_original_in_place -Xresolution=72 -Yresolution=72 {filepath$}
The list of options is somewhat hard to find, here is the link.
Just chiming in to say thank you to the folks behind EXIFTOOL and Leo and other folks that have solved this issue.
I, too, ran into an issue where I brought images into ABBYY Finereader and for some reason it uses the DPI field to make decisions on how to process the images resulting in a wildly bloated ABBYY project file. I wanted to batch convert the metadata of a hundreds of images to change the way ABBYY imported them, and the <EXIFTOOL+DOpus> button solution is just what I needed.
As a feature request, it would be nice to have the ability within the DOpus image conversion for batch conversion of resolution metadata. Also, when I show the metadata pane for an individual image, it doesn't show the image dimensions (Resolution (X), Resolution (Y)), which I figured would be available to edit, so that would be nice to see in the metadata pane as well.
Is it possible to create a popup on Dopus that prompts you for value inputs before running the button's command? (so that I could enter desired X/Y resolution before modifying the file?)
You might want to search the DOPUS help for dlgstring.
playful,
Where/how did you enter this ExifTool command? Did you create a button?
It'll work in an Opus toolbar button, menu item or hotkey.
See the Raw Commands section of How to use buttons and scripts from this forum
Thanks Leo,
Today I discovered that a command can be entered in the 'Find' bar with no need to create a toolbar button, menu item or hotkey. I had not seen that information before.
I am trying to collect clues un this forum to figure out Exiftool commands and how/where to enter them, so I wondered what option "playful" used.
Related to this topic, I just discovered that the lightweight image viewer that I use (FastStone) has the capability to change the DPI of an image. When you have an individual image opened, go to Edit > Set DPI. After you change it, you then have to "Save as" and create a new copy of the image with the revised DPI.
In case you need to do multiple images, you can go to FastStone's "browser view" (aka a simple directory view of a folder) and then select the images you want to change. Right click > Tools > Batch convert. Click checkbox "Use advanced options", then click the button to the right > DPI > change DPI. After that you complete the batch convert operation and you're set.
This is a little more involved than a simple button in DOpus, but I only rarely do it. I found that the EXIF DPI command was not reliably changing the DPI of various image files. Hopefully FastStone is a little more reliable. So far I've used it on .jpg's and it's worked.