Re: [Gimp-developer] GIMP python (pythonfu) plugin: How to include the PreviewArea from gimpui



On 07/20/2013 07:22 PM, Akkana Peck wrote:
Michael Schroeder writes:
I am writing a plugin for Gimp. It works alright via the GIMP UI and
command line by registering it to gimp. But I would wish to offer also a
Preview area in the UI, and apparently it is not so easy to add the
PreviewArea from the gimpui python package to the input dialog.
Since I haven't seen any other responses:

I don't think there's a way to add a formal preview area in Python.
But Python does allow you to write any UI you want -- you have the
full pygtk library available. So you could make a scaled-down
version of the image, do your preview operations to it, and show
it in a drawing area.

I'm not sure if there are any good examples of Python scripts that
do this. It would be great if someone would try this, write an
example and contribute it as pygimp documentation. There are lots
of examples for displaying images in pygtk -- I've found that simple
to do in other programs -- so it's mostly a matter of getting the GIMP
image into a format pygtk can display, and I don't know how hard or
easy that is. If you try it, please post a followup here.



Not too realistic... pixel-oriented operations in python would be much to slow to be usable in a preview

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]