You are here

Resize and Match DPI

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Rate this item!
AttachmentSize
resize-match-dpi.scm2.05 KB

Resize-match-dpi is a GIMP Script-Fu script to resize or scale an image along with scaling the DPI. If we scan a 4.75″ x 4.70″ image at 300 DPI with a pixel resolution of 1425 x 1409 and we want to scale it down to 1280×1266, most programs will rescale the image but not touch the DPI. This means when the image is viewed or printed it will appear too small (4.27″ x 4.22″). This script scales the DPI to match the new pixel resolution so it will still appear as 4.75″ x 4.70″. Comments are greatly appreciated.

To install the script, save it as resize-match-dpi.scm into C:\Users\Odie\.gimp-2.6\scripts\. Open up GIMP and the script will appear under the Script-Fu menu at the top of an image window. If you are really adventurous, I’ve included a small wrapper allowing the script to be called from the console as follows:

"C:\Program Files\GIMP-2.0\bin\gimp-console-2.6" -i
-b "(resize_match_dpi \"input.bmp\" \"output.bmp\" 1280 0)"
-b "(gimp-quit 0)"

Originally posted by odie5533 at http://odie5533.com/gimp-resize-and-match-dpi-in-scheme-304

Code License: 
GIMP Version: 
Scripting Engine: 
Subscribe to Comments for "Resize and Match DPI"