<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Non static image plugin]]></title><description><![CDATA[<p dir="auto">Has anyone been able to successfully create a previously unsupported image plugin type (i.e. not TIFF, JPG, GIFF, ICO, etc)?</p>
<p dir="auto">I ask because I believe there is a significant bug in the 'qmetaobject.cpp' kernel module.</p>
]]></description><link>https://forum.qt.io/topic/13020/non-static-image-plugin</link><generator>RSS for Node</generator><lastBuildDate>Thu, 16 Apr 2026 01:10:58 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/13020.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 11 Jan 2012 17:55:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Non static image plugin on Wed, 12 Jun 2013 12:19:50 GMT]]></title><description><![CDATA[<p dir="auto">Hello</p>
<p dir="auto">This fantastic Flip Image Plugin lets me design the back of my photo to complement the text I put there. It offers a great choice of colors and fonts. Way to go Flip Image!</p>
<p dir="auto"><a href="http://wordpress.org/extend/plugins/wp-flip-image-free" target="_blank" rel="noopener noreferrer nofollow ugc">http://wordpress.org/extend/plugins/wp-flip-image-free</a></p>
<p dir="auto">Thanks.</p>
]]></description><link>https://forum.qt.io/post/126311</link><guid isPermaLink="true">https://forum.qt.io/post/126311</guid><dc:creator><![CDATA[KarolDuke]]></dc:creator><pubDate>Wed, 12 Jun 2013 12:19:50 GMT</pubDate></item><item><title><![CDATA[Reply to Non static image plugin on Fri, 23 Mar 2012 16:11:05 GMT]]></title><description><![CDATA[<p dir="auto">Hi guys</p>
<p dir="auto">Sorry to "up" this old thread...</p>
<p dir="auto">Steve, did you solve your problem?<br />
I have the same message with my custom image plugin. the only thing I had found is that there is some mismatch with Qt versions (4.7.4 and 4.8.0 installed...). And my plugin is nether recognised (QImageReader::supportedImageFormats does not return my image format).</p>
<p dir="auto">Regards,<br />
Nmut.</p>
]]></description><link>https://forum.qt.io/post/125472</link><guid isPermaLink="true">https://forum.qt.io/post/125472</guid><dc:creator><![CDATA[Nmut]]></dc:creator><pubDate>Fri, 23 Mar 2012 16:11:05 GMT</pubDate></item><item><title><![CDATA[Reply to Non static image plugin on Fri, 13 Jan 2012 22:21:24 GMT]]></title><description><![CDATA[<p dir="auto">No, what you see is what I have.  There's just the one form, with the single label on it.  I have no other threads defined, and I don't use another library.  I do not load the plugin manually; QT loads is automatically.</p>
]]></description><link>https://forum.qt.io/post/123833</link><guid isPermaLink="true">https://forum.qt.io/post/123833</guid><dc:creator><![CDATA[SteveBooth]]></dc:creator><pubDate>Fri, 13 Jan 2012 22:21:24 GMT</pubDate></item><item><title><![CDATA[Reply to Non static image plugin on Fri, 13 Jan 2012 21:51:25 GMT]]></title><description><![CDATA[<p dir="auto">Do you have another library in use which sneaks in the secondary thread? Do you load the plugin manually or do you leave it delegated to the image I/O system?</p>
<p dir="auto">My plugin is not yet ready to be published, so I cannot offer something to test and compare for you.</p>
]]></description><link>https://forum.qt.io/post/123831</link><guid isPermaLink="true">https://forum.qt.io/post/123831</guid><dc:creator><![CDATA[goetz]]></dc:creator><pubDate>Fri, 13 Jan 2012 21:51:25 GMT</pubDate></item><item><title><![CDATA[Reply to Non static image plugin on Fri, 13 Jan 2012 16:54:38 GMT]]></title><description><![CDATA[<p dir="auto">The moveToThread error message is caused by this code, at line 239 in 'qfactoryloader.cpp:</p>
<p dir="auto">@                    obj-&gt;moveToThread(QCoreApplicationPrivate::mainThread());@</p>
<p dir="auto">Which, in turn is called by line 292 in qimagereader.cpp:</p>
<p dir="auto">@        QImageIOPlugin *plugin = qobject_cast&lt;QImageIOPlugin *&gt;(l-&gt;instance(QString::fromLatin1(suffix)));<br />
@</p>
<p dir="auto">It's trying to get a plugin pointer for my DLL class so it can call the 'create' method.  The thread error causes the above line to return zero for 'plugin', and hence, none of my other plugin classes gets called.</p>
]]></description><link>https://forum.qt.io/post/123806</link><guid isPermaLink="true">https://forum.qt.io/post/123806</guid><dc:creator><![CDATA[SteveBooth]]></dc:creator><pubDate>Fri, 13 Jan 2012 16:54:38 GMT</pubDate></item><item><title><![CDATA[Reply to Non static image plugin on Fri, 13 Jan 2012 16:21:23 GMT]]></title><description><![CDATA[<p dir="auto">Ummm... Well first, I don't use threads in my app -- that's why the message seemed strange.  And secondly, your suggestion is exactly where I am, now.  Here is my app currently (minus the 'main.cpp which is the generic app startup for a single dialog):</p>
<p dir="auto">@#include "qimsktest.h"</p>
<p dir="auto">#include "qfileinfo.h"</p>
<p dir="auto">#include "qpluginloader.h"<br />
#include "qlibrary.h"<br />
#include "qimageiohandler.h"</p>
<p dir="auto">QIMskTest::QIMskTest(QWidget *parent, Qt::WFlags flags)<br />
: QMainWindow(parent, flags)<br />
{<br />
ui.setupUi(this);</p>
<p dir="auto">QString mskFp("...0012.msk");</p>
<p dir="auto">QImage* mskImg = new QImage(mskFp);</p>
<p dir="auto">QPixmap mskPmp = QPixmap::fromImage(*mskImg);</p>
<p dir="auto">ui.mskImg-&gt;setPixmap(sMskPmp);<br />
}</p>
<p dir="auto">QIMskTest::~QIMskTest()<br />
{</p>
<p dir="auto">}<br />
@</p>
]]></description><link>https://forum.qt.io/post/123795</link><guid isPermaLink="true">https://forum.qt.io/post/123795</guid><dc:creator><![CDATA[SteveBooth]]></dc:creator><pubDate>Fri, 13 Jan 2012 16:21:23 GMT</pubDate></item><item><title><![CDATA[Reply to Non static image plugin on Fri, 13 Jan 2012 16:13:07 GMT]]></title><description><![CDATA[<p dir="auto">So, you have threads involved. That complicates things.</p>
<p dir="auto">As a first step: Cut down your application to just the imageformat plugin and a very, very simple test application. No threads, no fancy GUI. Just a dialog containing a label and three lines to set an image on the label - setPixmap(QPixmap::fromImage(xxx)). Nothing more.</p>
<p dir="auto">If <em>that</em> works, move on to a bigger project. If not, feel free to come back here, of course :)</p>
]]></description><link>https://forum.qt.io/post/123796</link><guid isPermaLink="true">https://forum.qt.io/post/123796</guid><dc:creator><![CDATA[goetz]]></dc:creator><pubDate>Fri, 13 Jan 2012 16:13:07 GMT</pubDate></item><item><title><![CDATA[Reply to Non static image plugin on Fri, 13 Jan 2012 16:08:28 GMT]]></title><description><![CDATA[<p dir="auto">Yes, actually:</p>
<p dir="auto"><em>QObject::moveToThread: Current thread (0x1f2a7b0) is not the object's thread (0x398450).<br />
Cannot move to target thread (0x1f2a7b0)</em></p>
<p dir="auto">Although, I cant, for the life of me, see how it relates.</p>
]]></description><link>https://forum.qt.io/post/123793</link><guid isPermaLink="true">https://forum.qt.io/post/123793</guid><dc:creator><![CDATA[SteveBooth]]></dc:creator><pubDate>Fri, 13 Jan 2012 16:08:28 GMT</pubDate></item><item><title><![CDATA[Reply to Non static image plugin on Thu, 12 Jan 2012 22:34:02 GMT]]></title><description><![CDATA[<p dir="auto">I'm using the Mac, Qt 4.8.0. But this shouldn't be a problem.</p>
<p dir="auto">Do you get any output on the console? Some warnings, etc.?</p>
]]></description><link>https://forum.qt.io/post/123712</link><guid isPermaLink="true">https://forum.qt.io/post/123712</guid><dc:creator><![CDATA[goetz]]></dc:creator><pubDate>Thu, 12 Jan 2012 22:34:02 GMT</pubDate></item><item><title><![CDATA[Reply to Non static image plugin on Thu, 12 Jan 2012 14:46:38 GMT]]></title><description><![CDATA[<p dir="auto">Interesting. Can you give me some more info about your config? Version? iDE you used, What file type you defined, please. Mine is 4.7.4 64 bit and VS 2010</p>
]]></description><link>https://forum.qt.io/post/123687</link><guid isPermaLink="true">https://forum.qt.io/post/123687</guid><dc:creator><![CDATA[SteveBooth]]></dc:creator><pubDate>Thu, 12 Jan 2012 14:46:38 GMT</pubDate></item><item><title><![CDATA[Reply to Non static image plugin on Thu, 12 Jan 2012 12:42:34 GMT]]></title><description><![CDATA[<p dir="auto">The code looks ok so far. I just tried with my own plugin, it gets called and I don't get any errors (despite my actual read method not being implemented yet and thus returning and empty image :) )</p>
]]></description><link>https://forum.qt.io/post/123673</link><guid isPermaLink="true">https://forum.qt.io/post/123673</guid><dc:creator><![CDATA[goetz]]></dc:creator><pubDate>Thu, 12 Jan 2012 12:42:34 GMT</pubDate></item><item><title><![CDATA[Reply to Non static image plugin on Thu, 12 Jan 2012 02:59:58 GMT]]></title><description><![CDATA[<p dir="auto">Tried that; it had no effect.  And, none of the example plugins have Q_OBJECT.  For example, here's the plugin def for the 'ICO' file type:</p>
<p dir="auto">@class QICOPlugin : public QImageIOPlugin<br />
{<br />
public:<br />
QStringList keys() const;<br />
Capabilities capabilities(QIODevice *device, const QByteArray &amp;format) const;<br />
QImageIOHandler *create(QIODevice *device, const QByteArray &amp;format = QByteArray()) const;<br />
};<br />
@</p>
]]></description><link>https://forum.qt.io/post/123620</link><guid isPermaLink="true">https://forum.qt.io/post/123620</guid><dc:creator><![CDATA[SteveBooth]]></dc:creator><pubDate>Thu, 12 Jan 2012 02:59:58 GMT</pubDate></item><item><title><![CDATA[Reply to Non static image plugin on Thu, 12 Jan 2012 02:18:18 GMT]]></title><description><![CDATA[<p dir="auto">The class declaration in the header file (.h) is missing the Q_OBJECT macro.</p>
<p dir="auto">@<br />
QT_BEGIN_NAMESPACE</p>
<p dir="auto">class MskPlugin : public QImageIOPlugin<br />
{<br />
Q_OBJECT<br />
public:<br />
QStringList keys() const;<br />
@</p>
]]></description><link>https://forum.qt.io/post/123618</link><guid isPermaLink="true">https://forum.qt.io/post/123618</guid><dc:creator><![CDATA[goetz]]></dc:creator><pubDate>Thu, 12 Jan 2012 02:18:18 GMT</pubDate></item><item><title><![CDATA[Reply to Non static image plugin on Thu, 12 Jan 2012 02:14:13 GMT]]></title><description><![CDATA[<p dir="auto">Alright.  Here's the .h file:</p>
<p dir="auto">@#ifndef MSKPLUGIN_H<br />
#define MSKPLUGIN_H</p>
<p dir="auto">#include "mskplugin_global.h"<br />
#include "MskHandler.h"</p>
<p dir="auto">#include &lt;qstringlist.h&gt;<br />
#include &lt;QImageIOPlugin&gt;<br />
//#include &lt;QtPlugin&gt;</p>
<p dir="auto">QT_BEGIN_NAMESPACE</p>
<p dir="auto">class MskPlugin : public QImageIOPlugin<br />
{<br />
public:<br />
QStringList keys() const;<br />
Capabilities capabilities(QIODevice *device, const QByteArray &amp;format) const;<br />
QImageIOHandler *create(QIODevice *device, const QByteArray &amp;format = QByteArray()) const;</p>
<p dir="auto">private:</p>
<p dir="auto">};</p>
<p dir="auto">#endif // MSKPLUGIN_H<br />
@</p>
<p dir="auto">and the .cpp:</p>
<p dir="auto">@#include "mskplugin.h"</p>
<p dir="auto">QStringList MskPlugin::keys() const<br />
{<br />
return QStringList() &lt;&lt;  QLatin1String("msk");<br />
}</p>
<p dir="auto">QImageIOPlugin::Capabilities MskPlugin::capabilities(<br />
QIODevice *device, const QByteArray &amp;format) const<br />
{<br />
if (format == "msk")<br />
return Capabilities(CanRead);<br />
//return Capabilities(CanRead | CanWrite); Writing currently disabled.</p>
<pre><code>if (!(format.isEmpty() &amp;&amp; device-&gt;isOpen()))
    return 0;

Capabilities cap;
</code></pre>
<p dir="auto">if (device-&gt;isReadable() &amp;&amp; device-&gt;peek(4) == "MSK2")<br />
cap |= CanRead;</p>
<p dir="auto">/* Currently, disable writing.<br />
if (device-&gt;isWritable())<br />
cap |= CanWrite;<br />
*/</p>
<pre><code>return cap;
</code></pre>
<p dir="auto">}</p>
<p dir="auto">QImageIOHandler *MskPlugin::create(QIODevice *device, const QByteArray &amp;format) const<br />
{<br />
QImageIOHandler *handler = new MskHandler;<br />
handler-&gt;setDevice(device);<br />
handler-&gt;setFormat(format);<br />
return handler;<br />
}</p>
<p dir="auto">Q_EXPORT_PLUGIN2(mskPlugin, MskPlugin)</p>
<p dir="auto">QT_END_NAMESPACE<br />
@</p>
]]></description><link>https://forum.qt.io/post/123617</link><guid isPermaLink="true">https://forum.qt.io/post/123617</guid><dc:creator><![CDATA[SteveBooth]]></dc:creator><pubDate>Thu, 12 Jan 2012 02:14:13 GMT</pubDate></item><item><title><![CDATA[Reply to Non static image plugin on Thu, 12 Jan 2012 02:01:01 GMT]]></title><description><![CDATA[<p dir="auto">Hard to say anything without seeing some code.</p>
]]></description><link>https://forum.qt.io/post/123615</link><guid isPermaLink="true">https://forum.qt.io/post/123615</guid><dc:creator><![CDATA[goetz]]></dc:creator><pubDate>Thu, 12 Jan 2012 02:01:01 GMT</pubDate></item><item><title><![CDATA[Reply to Non static image plugin on Thu, 12 Jan 2012 01:25:16 GMT]]></title><description><![CDATA[<p dir="auto">Well, all I can say is that I just created a plugin derived from QImageIOPlugin, and it;s DLL is found, and the 'keys' routine is called, but qmetaobject.cpp fails to recognize that it is a subclass of QImageIOPlugin.  As a result, 'create' is never called, and it does not work.</p>
]]></description><link>https://forum.qt.io/post/123613</link><guid isPermaLink="true">https://forum.qt.io/post/123613</guid><dc:creator><![CDATA[SteveBooth]]></dc:creator><pubDate>Thu, 12 Jan 2012 01:25:16 GMT</pubDate></item><item><title><![CDATA[Reply to Non static image plugin on Thu, 12 Jan 2012 01:14:52 GMT]]></title><description><![CDATA[<p dir="auto">If you refer to subclasses of &lsqb;&lsqb;Doc:QImageIOPlugin&rsqb;&rsqb;, yes, these work. All the image format plugins delivered with Qt are based on this.</p>
<p dir="auto">If qmetaobject.cpp contained an error, I would suspect it to have popped up long before.</p>
]]></description><link>https://forum.qt.io/post/123610</link><guid isPermaLink="true">https://forum.qt.io/post/123610</guid><dc:creator><![CDATA[goetz]]></dc:creator><pubDate>Thu, 12 Jan 2012 01:14:52 GMT</pubDate></item></channel></rss>