I found a very interesting plugin: It is called "ResIL" which ic based on "devIL": http://openil.sourceforge.net/
I was able to compile ResIL with the help of Visual Studio 2010.
Then I found a page which describes how to create a custom image file format for QT. The problem here is that the page is in French. And the code is a little bit confusing. I cannot really figure out how the code is using the libs from ResIL.
http://tcuvelier.developpez.com/tuto.../extend/devil/
https://translate.google.com/transla...end%2Fdevil%2F
It is based on this site: http://doc.qt.digia.com/qq/qq17-imageio.html
Maybe someone has an idea how to create this plugin. It is really unfortunattly that the link to the project file at the end is not working.
Added after 1 35 minutes:
OK, I ignored the french site and tried the old qt page tutorial. Now I am almost done and I only get one error message:
argbplugin.cpp:32: error: invalid new-expression of abstract class type 'ArgbHandler'
QImageIOHandler *handler = new ArgbHandler;
I dont know why it is not compiling. I just copy / paste it from the tutorial. I will attach the pro file. I think it is quite easy but i am lacking experience here:
I am using QT 5.41. and QT Creator 3.3.1
{
};
class ArgbPlugin : public QImageIOPlugin
{
QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const;
};
To copy to clipboard, switch view to plain text mode
{
handler->setDevice(device);
handler->setFormat(format);
return handler;
}
QImageIOHandler *ArgbPlugin::create( QIODevice *device, const QByteArray &format) const
{
QImageIOHandler *handler = new ArgbHandler;
handler->setDevice(device);
handler->setFormat(format);
return handler;
}
To copy to clipboard, switch view to plain text mode
Project:ARGB2.zip
Bookmarks