Post all Gimp scripts and script writing questions here
Sun Feb 14, 2021 5:11 pm
Hello
It can't be that much difficult !
Where can i find tutorial about that part ?
Thanks
Fransua
Mon Feb 15, 2021 5:34 am
fransua wrote:Hello
It can't be that much difficult !
Where can i find tutorial about that part ?
Thanks
Fransua
It can't be that much difficult to actually explain what your question is, now can it? Unfortunately my crystal ball doesn't work.
Mon Feb 15, 2021 5:46 am
fransua wrote:Hello
It can't be that much difficult !
Where can i find tutorial about that part ?
Thanks
Fransua
Tried the "Browse" button in the Python-fu/Script-fu console? They lead to the doc of the whole API.
Mon Feb 15, 2021 8:04 am
Thanks Guys. What an active forum !
My pb : I have created an image from a gmic filter which comes like : [<gimp.Image '[Sans titre]'>,
The image is displayed correctly.
Now I want delete it after saving it.
This is where I bug ! (last 2 lines)
pdb.gimp_message(gimp.image_list())
active_Image=gimp.image_list()[0]
active_layer = pdb.gimp_image_get_active_layer(active_Image)
#reverse layer
pdb.script_fu_reverse_layers(active_Image, active_layer)
# save the file to a new filename
out_filename=out_directory+filename+command[i]+".jpg"
pdb.gimp_file_save(active_Image, active_layer, out_filename, out_filename)
pdb.gimp_display_delete(active_Image)
pdb.gimp_image_delete(active_Image)
Mon Feb 15, 2021 8:13 am
"active_Image=gimp.image_list()[0]": likely not unless you have only one image. The image to which your plugin/script applies is passed as an input parameter if you do the registration with the proper parameter description. Otherwise, if GMIC returns an image, then use the returned image. The parameter to "display_delete()" is a display, not an image(*). Normally a script/plugin can only delete displays that itcreated, and you get the display id when you create it. By design you aren't supposed to be able to delete a display that you didn't create (there are ways around this but really you shouldn't need them).
(*) An image can have several displays, from the user's perspective this is "View>New view".
Mon Feb 15, 2021 8:32 am
Thanks Ofnuts.
Is there a way to get the display from image.id ?
Tue Feb 16, 2021 10:53 am
Which display, since an image can have several displays... But in the API, no way to tell which display belongs to which image.
Powered by phpBB © phpBB Group.
phpBB Mobile / SEO by Artodia.