gimpusers.com logo
German version English version

Not logged in

Sign up! | Lost password?

Latest discussion

  1. gimp-docs | yesterday 10:55 PM
    a new user perspective
  2. gimp-developer | yesterday 08:04 PM
    scanner support should be File->Acquire
  3. gegl-developer | yesterday 06:24 PM
    babl docs
  4. gimp-docs | yesterday 12:46 PM
    GIMP Manual
  5. gimp-user | yesterday 09:42 AM
    Bug

External news

Poll

How good are you at programming?

OMG, that is nothing for me at all!

I've been coding a little bit but I'm not very fit at it

I'm pretty good at programming and would maybe be able to write a Plug-In for GIMP

I'm very good at programming and I would theoretically be able to hack for the GIMP core

See results

Stats

gimpusers.com RSS feed

GIMP Forums » For GIMP users

[script] resize image in pourcent

Jump to message:

  1. [script] resize image... — Didier Bretin, 04 Jul 2009 01:20 PM
    1. [script] resize image... — saulgoode@flashin..., 04 Jul 2009 05:58 PM
      1. [script] resize image... — Didier Bretin, 05 Jul 2009 08:25 AM

As a registered user, you can subscribe forum threads in order to get notified when replies are posted. Just log in at the right top of the page if you already have an account, otherwise you can register for free.

Permalink:4A4F3B0D.9090600@bretin.net
Date:04 Jul 2009 01:20 PM
From:Didier Bretin
Subject:[script] resize image in pourcent
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
↑Back to thread overview
Permalink:20090704115855.eh4r1xgesowo0og0@flash...
Date:04 Jul 2009 05:58 PM
From:saulgoode@flashingtwelve.brickfilms.com
Subject:[script] resize image in pourcent
Quoting Didier Bretin <didier@bretin.net>:

> 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
↑Back to thread overview
Permalink:4A504775.4070107@bretin.net
Date:05 Jul 2009 08:25 AM
From:Didier Bretin
Subject:[script] resize image in pourcent
saulgoode@flashingtwelve.brickfilms.com wrote:
> Quoting Didier Bretin <didier@bretin.net>:
>
>> 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
↑Back to thread overview

Adobe® Photoshop® is a registered trademark of Adobe Systems, Inc. Linux is a trademark of Linus Torvalds. Ubuntu and Canonical are registered trademarks of Canonical Ltd. | Clock times are shown as CET / CEST | Imprint / Privacy policy | powered by bitfire it services | sponsored by Hirners Hotel Guide