Re: [Gimp-user] [script] resize image in pourcent

2009-07-04 Thread Didier Bretin
saulgo...@flashingtwelve.brickfilms.com wrote:
> Quoting Didier Bretin :
> 
>> 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
http://bretin.net/
http://twitter.com/didier69
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] [script] resize image in pourcent

2009-07-04 Thread saulgoode
Quoting Didier Bretin :

> 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@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


[Gimp-user] [script] resize image in pourcent

2009-07-04 Thread Didier Bretin
Hi,

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 ?

Regards.
-- 
Didier Bretin
http://bretin.net/
http://twitter.com/didier69
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user