« Return to Thread: [script] resize image in pourcent

Re: [script] resize image in pourcent

by saulgoode :: Rate this Message:

Reply to Author | View in Thread

Quoting Didier Bretin <didier@...>:

> I'm improving my script, and I would like to use the function
> gimp-image-scale and specify widht and height in pourcent, not in pixel.
>
> Do you know how I can specify pourcent ?

You need to calculate the pixel values manually.

(gimp-image-scale image
                   (* (car (gimp-image-width image)) x-pct 0.01)
                   (* (car (gimp-image-height image)) y-pct 0.01)
                   )



_______________________________________________
Gimp-user mailing list
Gimp-user@...
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user

 « Return to Thread: [script] resize image in pourcent