16

Does Gimp provide a way to export an image at a desirable dimensional size, and still preserve the original size while working in the UI? I need a scaled down version of a file I am currently working on.

Many thanks on any tips or ideas.

1
12

GIMP doesn't "provide" such a function, but you can - by paying attention to your workflow.

The easiest way to do that is to not rescale your image until you have saved your work.

When you have finished your work, save it as an XCF file. This file should be considered as your original artwork. Depending on which computer system you use, you could set the file permissions of that XCF file to "Read Only". That way you won't be able to overwrite it accidentally.

Next, with the XCF file open, rescale the document to the required dimensions. Then export as JPEG or PNG (or whatever format you want).

Finally, close the XCF file without saving. The original won't be overwritten, and when you open the XCF, it will be the original size that you saved it at.

0

I found a method that might work for you. In the command line, I run this script in the folder where my files are.

while true; do
   sleep 3
   for file in *.png; do
      currentwidth=`identify -format '%w' "$file"`
      newwidth=`echo "$file" | egrep -o "\d*\.png$" | egrep -o "\d*"`
      if [[ -n $newwidth && $currentwidth != $newwidth ]]; then
         echo "Scaling $file"
         cp "$file" "${file%.png}-beforeScaling.png"
         magick "$file" -scale "$newwidth" "$file"
      fi
   done
done

Then, in GIMP, when I export to a filename like logo400.png, this script automatically scales the image to 400px in width (adjusting the height accordingly). This makes it easy to export to multiple widths.

This requires ImageMagick, which you can download with brew install imagemagick, apt install imagemagick, or the equivalent.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.