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