#!/usr/bin/perl -w use strict; use Gimp ":auto"; use Gimp::Fu; sub set_image_dpi { my ($dpi, $input) = @_; # Load the file my $img = gimp_file_load($input, $input); # Set the resolution $img->set_resolution($dpi, $dpi); # Return the image return $img; } register "set_image_dpi", # name "Set Image DPI", # small description "Sets the dots per inch of an image", # help text "Nick Craig-Wood", # Author name "Nick Craig-Wood", # Copyright "2001-08-01", # Date "/Xtns/Perl-Fu/Set Image DPI", # menu path "*", # Image types [ [PF_FLOAT, "dpi", "New DPI of image", 72], [PF_FILE, "input", "Input File Name", ""], ], \&set_image_dpi; exit main();