gimpusers.com logo
German version English version

Not logged in

Sign up! | Lost password?

Latest discussion

  1. gimp-developer | today 06:14 AM
    GIMP color-management spec and further discussion
  2. gimp-user | yesterday 11:13 PM
    collages in gimp?
  3. gimp-user | yesterday 08:29 PM
    Need help: "correcting" exposures in time-lapse imagesets
  4. gimp-developer | yesterday 07:07 PM
    Color management (UI perspective for GIMP 2.8)
  5. gimp-user | yesterday 02:42 PM
    printing

External news

Poll

Would you like to be able to use your Google/Yahoo/MSN (OpenID) login on gimpusers, too?

Definately! I would enjoy the possibility to use my OpenID on different websites!

I don't have a special need for OpenID but I think it could be useful

Doesn't matter to me

Never, OpenID is a pain regarding privacy and personal data protection!

No. (please post a comment)

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