Fwd: Re: [Kde-imaging] Manipulating image data from within a KIPI plugin

Jesper K. Pedersen blackie at kde.org
Sun May 16 16:37:13 CEST 2004


Hmm nameserver problems...I guess...so this mail is still queued at my 
machine.

----------  Forwarded Message  ----------

Subject: Re: [Kde-imaging] Manipulating image data from within a KIPI plugin
Date: Friday 14 May 2004 22:14
From: "Jesper K. Pedersen" <blackie at kde.org>
To: kde-imaging at kde.org
Cc: Aurélien Gâteau <aurelien.gateau at free.fr>

On Friday 14 May 2004 13:56, Aurélien Gâteau wrote:
| Le Vendredi 14 Mai 2004 13:39, Jesper K. Pedersen a écrit :
| > On Friday 14 May 2004 10:04, Aurélien Gâteau wrote:
| > | Hello,
| > |
| > | One user of Gwenview wanted to implement hot-pixel removing in
| > | Gwenview. I told him it would be nice to write this as a KIPI plugin,
| > | but he would like (and I agree with him) to work directly on the image
| > | data rather than on an image file.
| > | This made me think we should add a way for the host app to let the
| > | plugin access the image data. I imagine something like this:
| > |
| > | class Interface {
| > |   QImage& image();
| > |
| > |   // Dirty property used by the plugin to let the host app knows it
| > |   // modified the image data
| > |   void setImageDirty();
| > |   bool isImageDirty() const;
| > | }
| > |
| > | The only problem I see is that I'm not sure every app uses QImage to
| > | store the loaded image. What do you think about this?
| >
| > I do agree that it would be a good idea to have a way to tell the host
| > application that an image was changed, but I think it would be better
| > simply to let the client load the image itself.
| >
| > Maybe we could add utility methods for downloading and uploading the
| > image, if that is the problem.
|
| I think you misunderstood me. I was thinking about plugins similar to GIMP
| filters: plugins which would alter the image data loaded by an host app.
| The host app would load the image in a QImage and let the plugin access it
| through the Interface::image() method. Whenever the plugin modifies the
| image, it calls Interface::setImageDirty() so that the host app can refresh
| its display. This will let you implement sharpen, blur or other nifty image
| fx as plugins.

Ahhh now I understand you, but this requires a complete new set of plugins
doesn't it. And will adding an image() method be enough? I mean that kind of
plugins reacts to the user doing actions with the mouse on an image, doesn't
it? So we would need a way to allow mouse events in a viewer of the image to
get to the plugin, or do I still misunderstand you?

Cheers
Jesper

-------------------------------------------------------

-- 
Having trouble finding a given image in your collection containing
thousands of images?

http://ktown.kde.org/KimDaBa might be the answer.



More information about the Kde-imaging mailing list