Hi,
I have finally managed to compile an image format plugin for Qt 4 to open tif files.
I have the following files:
libqsytiff.a
qsytiff.dll
They installed to \plugins\imageformats so i move them to the correct \plugins\imageformats directory where Qt is actually installed.
The documentation in Qt Assisant states:
"For database drivers, image formats, text codecs, and most other plugin types, no explicit object creation is required. Qt will find and create them as required."
I had previously compiled the ImageViewer example from the Qt installation and was able to load jpg files. I believe this is done using the supplied libqjpeg.a and qjpeg.dll.
Given this, I figured that by simply selecting a tiff file, then it would just open, but I get an error stating "Cannot load <filename>"
First off, have I missed a step?
I feel there must be a call to my class but I can't find any documentation describing any more detail.
I based all my code on the source for the jpeg library and adjusted all the symbols from jpeg to SYTiff.
I have re implemented keys() with:
QStringList QSYTiffPlugin::keys() const
{
return QStringList() << "tiff" << "tif";
}
and I'm calling Q_EXPORT_PLUGIN(QSYTiffPlugin)
and my class definition is:
class QSYTiffPlugin : public QImageIOPlugin
and my .pro file has TEMPLATE = lib plugin defined.
I can post the entire source code somewhere if anyone's interested in seeing it.
Thanks,
Steve York