Re: [script] resize image in pourcent

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

saulgoode@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx wrote:
> Quoting Didier Bretin <didier@xxxxxxxxxx>:
>> 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)
>                    )

Yes ! Great, it works.

Thank you for your help.
Didier Bretin


[Gimp Announce]     [Gimp Images]     [GIMP Development]     [Video For Linux]     [Photo]     [Yosemite News]    [Yosemite Photos]    [gtk]     [KDE]     [Scanner]     [Gimp's Home]     [Gimp Docs]     [Gimp on Windows]     [Steve's Art]     [Webcams]     [Share Your Images]     [Free Online Dating]     [Photo Site]     [Script Fu]     [GIMP Software]     [GIMP Books]


Add to Google Follow Gimp on Twitter