RSS/Atom feed Twitter
Site is read-only, email is disabled

flip through python console problems

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

3 of 3 messages available
Toggle history

Please log in to manage your subscriptions.

flip through python console problems free 13 Sep 19:16
  flip through python console problems Kevin Cozens 18 Sep 03:10
   flip through python console problems free 19 Sep 19:19
free
2012-09-13 19:16:49 UTC (over 12 years ago)

flip through python console problems

Hello everybody!

I'm having some problems with a python command. I'm working on an image that is 640x640. I'm trying to do a horizontal flip of a layer with this command:

pdb.gimp_item_transform_flip(layer, 320, 0, 320, 1)

the flip succeeds, but it generates a distortion on the flipped layer. When I try to flip that layer through gimp's interface, it is smooth.

I understood that the input values for the flip function were the layer, x and y of one point of the axis from wich the image will be flipped, and x and y of the end point of that axis. Am I doing something wrong?

Here is the failure in the flip that I mentioned:

http://andarilho9.deviantart.com/gallery/?catpath=scraps#/d5eo255

this shouldn't happen or the flip will be useless for what I am trying to do. (the eye with problems is the first one, from left to right).

Thanks in advance, --
Thiago Henrique Petruccelli

Kevin Cozens
2012-09-18 03:10:35 UTC (over 12 years ago)

flip through python console problems

On 12-09-13 03:16 PM, free wrote:

pdb.gimp_item_transform_flip(layer, 320, 0, 320, 1)

the flip succeeds, but it generates a distortion on the flipped layer. When I try to flip that layer through gimp's interface, it is smooth.

You probably want to use the "simple" flip function. The version you were using flips the drawable about a line specified by the coordinates given. My mind can't quite make out how the image/layer will change when doing a flip that is not about a center line so I haven't used the more general transform flip operation.

Try the following statement to do your flip pdb.gimp_item_transform_flip_simple(layer, 0, TRUE, 0.0)

free
2012-09-19 19:19:16 UTC (over 12 years ago)

flip through python console problems

Thanks Kevin! Works like a charm :)

Em 18/9/2012 00:10, Kevin Cozens escreveu:

On 12-09-13 03:16 PM, free wrote:

pdb.gimp_item_transform_flip(layer, 320, 0, 320, 1)

the flip succeeds, but it generates a distortion on the flipped layer. When I try to flip that layer through gimp's interface, it is smooth.

You probably want to use the "simple" flip function. The version you were using flips the drawable about a line specified by the coordinates given. My mind can't quite make out how the image/layer will change when doing a flip that is not about a center line so I haven't used the more general transform flip operation.

Try the following statement to do your flip pdb.gimp_item_transform_flip_simple(layer, 0, TRUE, 0.0)