Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scale image relative size?
#1
Hi all! I'm trying to work out a script that I can use to reduce the size of an image by half. However, I need this to work with images of different sizes, but I always want them to be scaled to half their size. I know that this code exists:

Code:
(gimp-image-scale image X Y)

But I've only ever used it for absolute sizes. How can I make it be relative? I'm assuming I'll need to get the current size of the image and then multiply those variables by 0.5, then use the variables in this command, but I'm having trouble finding any documentation about actually getting the layer sizes. Any help is appreciated!
Modder/Skinner at MarvelMods.com using GIMP to create, edit, and export textures and previews more efficiently.

My GIMP scripts hosted on GitHub
Reply


Messages In This Thread
Scale image relative size? - by BaconWizard17 - 08-14-2022, 02:46 PM
RE: Scale image relative size? - by Ofnuts - 08-14-2022, 03:15 PM
RE: Scale image relative size? - by BaconWizard17 - 08-25-2022, 12:15 AM
RE: Scale image relative size? - by rich2005 - 08-14-2022, 03:55 PM
RE: Scale image relative size? - by Kevin - 08-25-2022, 07:47 AM
RE: Scale image relative size? - by BaconWizard17 - 08-26-2022, 06:00 PM
RE: Scale image relative size? - by Ofnuts - 08-26-2022, 07:14 PM
RE: Scale image relative size? - by BaconWizard17 - 08-27-2022, 07:08 PM

Forum Jump: