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

2009-07-05 Thread Didier Bretin
saulgo...@flashingtwelve.brickfilms.com wrote:
 Quoting Didier Bretin did...@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


Re: [Gimp-user] Error on script-fu

2009-07-04 Thread Didier Bretin
saulgo...@flashingtwelve.brickfilms.com wrote:
 You should report back on whether a suggestion works, else people  
 might assume all is copacetic.

Yes you are right, sorry ;).

 Looking deeper at your script, the problem is with the call which adds  
 the bevel:
 
 (script-fu-add-bevel 0 image newCalque 30 FALSE FALSE)
 
 When a Script-fu calls another Script-fu, you need to omit the  
 RUN-MODE (when calling a plug-in though, the RUN-MODE is needed). Your  
 call should be emended to:
 
 (script-fu-add-bevel image newCalque 30 FALSE FALSE)

Great it works !

I will look deeper in the documentation to see if it's write somewhere.

Thanks again for the answer.
-- 
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


[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


Re: [Gimp-user] Error on script-fu

2009-07-03 Thread Didier Bretin
Hi,

Nobody can help me with this issue ?

I searched on the web, but I can't find an example which can help me 
with this :(.

Thanks for your help or tips.

Didier Bretin wrote:
 Hi,
 
 I'm new to the world of script-fu writing, and I'm trying to make a 
 script for repetitive actions I need to make.
 
 Here is my script:
 (define (make-pion-3d image calque)
(let *
  (
(newCalque (car (gimp-layer-copy calque TRUE)))
  )
  (gimp-image-add-layer image newCalque 0)
  (script-fu-add-bevel 0 image newCalque 30 FALSE FALSE)
)
 )
 
 (script-fu-register
make-pion-3d
Make pion 3D
Creates a 3D pion
Didier Bretin
Didier Bretin
2009

SF-IMAGE Image 0
SF-DRAWABLE Calque du pion 0
 )
 (script-fu-menu-register make-pion-3d Toolbox/Xtns/Script-Fu/Pion)
 
 
 And when I try to apply it on a layer, I got the following error:
 Erreur d'exécution « Make pion 3D » :
 Error: Procedure execution of gimp-image-get-active-drawable failed on 
 invalid input arguments: La procédure « gimp-image-get-active-drawable » 
 a été appelée avec un ID erroné pour le paramètre « image ». Très 
 probablement un greffon est en train d'essayer de travailler sur une 
 image qui n'existe plus.
 
 The french error message tells that I use a false ID for the parameter 
 image. Probably a script is trying to work on a image that doesn't 
 exist anymore.
 
 Any idea which error I make ?
 
 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


Re: [Gimp-user] Error on script-fu

2009-07-03 Thread Didier Bretin
Michael Schumacher wrote:
 Didier Bretin wrote:
 
 Nobody can help me with this issue ?
 
 What about the first reply you got - didn't this help?

Not at all. Now my plugin is in the right menu, but I have the same error.
-- 
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


[Gimp-user] Error on script-fu

2009-06-24 Thread Didier Bretin
Hi,

I'm new to the world of script-fu writing, and I'm trying to make a 
script for repetitive actions I need to make.

Here is my script:
(define (make-pion-3d image calque)
   (let *
 (
   (newCalque (car (gimp-layer-copy calque TRUE)))
 )
 (gimp-image-add-layer image newCalque 0)
 (script-fu-add-bevel 0 image newCalque 30 FALSE FALSE)
   )
)

(script-fu-register
   make-pion-3d
   Make pion 3D
   Creates a 3D pion
   Didier Bretin
   Didier Bretin
   2009
   
   SF-IMAGE Image 0
   SF-DRAWABLE Calque du pion 0
)
(script-fu-menu-register make-pion-3d Toolbox/Xtns/Script-Fu/Pion)


And when I try to apply it on a layer, I got the following error:
Erreur d'exécution « Make pion 3D » :
Error: Procedure execution of gimp-image-get-active-drawable failed on 
invalid input arguments: La procédure « gimp-image-get-active-drawable » 
a été appelée avec un ID erroné pour le paramètre « image ». Très 
probablement un greffon est en train d'essayer de travailler sur une 
image qui n'existe plus.

The french error message tells that I use a false ID for the parameter 
image. Probably a script is trying to work on a image that doesn't 
exist anymore.

Any idea which error I make ?

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