It is currently Sat Aug 22, 2026 4:57 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: simple (90) rotation behaves strange
PostPosted: Mon Jul 10, 2017 10:35 am  (#1) 
Offline
GimpChat Member

Joined: Sep 13, 2016
Posts: 137
Hallo.
I am building a plugin to cut out a strange coin.
Works till now.
BUT there exists the wish to rotate the result 90 degrees.
    ... computing upper left corner (links, oben) and the new width en height
    pdb.gimp_image_crop(image, width, height, links, oben)
    pdb.gimp_displays_flush() #??? needed?? no ??
    #pdb.gimp_image_select_rectangle(image, operation, x, y, width, height)
    pdb.gimp_item_transform_rotate_simple(image.layers[0],0, 1,0,0)
    return ("links rechts oben unten",links, rechts, oben, unten, width, height)

without ..flush.. and without ...rotate .. all works as expected.
adding alone pdb.gimp_item_transform_rotate_simple(image.layers[0],0, 1,0,0)
no error but I get an empty floating layer.
therefore I tryed adding the pdb.gimp_displays_flush() and then
the rotation command : no difference

using the rotation command via the python-console it works
Why not inside a def .. ????

EDIT:
Forgotten: W10 and Gimp 2.8.20


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: simple (90) rotation behaves strange
PostPosted: Mon Jul 10, 2017 12:52 pm  (#2) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4812
You don't need the display flush. A possible difference is the presence/absence of a selection. Seems to work well without one. When there is one, the results are indeed strange.

_________________
Image


Top
 Post subject: Re: simple (90) rotation behaves strange
PostPosted: Tue Jul 11, 2017 2:24 am  (#3) 
Offline
GimpChat Member

Joined: Sep 13, 2016
Posts: 137
ofnuts wrote:
You don't need the display flush. A possible difference is the presence/absence of a selection. Seems to work well without one. When there is one, the results are indeed strange.

Oh, if the selection is the problem, it will be easy to solve :yes

Thanks Ofnuts WORKS, after pdb.gimp_selection_none(image) the rotation works as it is meant ;-)

Peter


Top
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group