Re: Creating a new image loader

Aurélien Gâteau <[email protected]>
Newsgroups gmane.comp.kde.gwenview
Message-ID <[email protected]>
Selon Ruben Lopez <r.lopez-u/[email protected]>:

> Hi,
>
> I want to add my custom image format to gwenview. I have searched
> documentation and found that I should add this to KDE, which means
> adding it to Qt, this way:
>
> QImageIO::defineIOHandler( "format-name", "header-regexp", 0, read_func,
> write_func );
>
> But how can I make gwenview know this new format, I mean, should I make
> a .so library and put it somewhere where gwenview will look for?
>
> I can force loading of a .so library along with gwenview with an
> LD_PRELOAD, but I would like to use a cleaner way ;)

Hello,

You can either:
- add the code directly inside Gwenview, and register your format in
Document::Document()
- install your image format as a Qt image plugin. If I am not mistaken, this
means installing your .so in $QTDIR/plugins/imageformats/. It should then be
picked by every Qt3/KDE3 applications.

Hope this helps

Aurélien

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

_______________________________________________
Gwenview-general mailing list
Gwenview-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/gwenview-general
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.