<?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[QPainter Color Shift (red&#x2F;blue swapped) on mobile devices]]></title><description><![CDATA[<p dir="auto">I'm drawing an png image using Qt 5.6 (commercial), Qt Creator (for the mobile program), Visual Studio 2013 (for the windows program):  basically I'm using QPainter and QImage for rendering<br />
Here are some lines of my code:<br />
QImage img(w, h, QImage::Format_ARGB32_Premultiplied);<br />
img.fill(Qt::transparent);<br />
QPainter qpainter(img);<br />
qpainter.setRenderHint(QPainter::Antialiasing, true);</p>
<p dir="auto">This works fine for rendering an image on Windows.  When rendering the image on a mobile devices (in my case a Samsung Galaxy Tablet) the colors are shiftet.  To be precise red and blue are swaped.  I copied this image from the tablet to windows and the image has still shifted colors.  Thus it seems to be a problem in the rendering process.</p>
<p dir="auto">Using an image with alpha channel is important.  I can't switch to a format whithout alpha.<br />
I tried some other alpha channel formats, e.g. Format_ARGB32.  But the color problem still occurs.</p>
<p dir="auto">I changed the program such that it swaps red/blue and the picture rendered on the tablet looks fine (of course now rendering on windows results in wrong colors).  But this is not a good solution, since I dont now if this behavior is on every tablet the same.</p>
<p dir="auto">Is there something known about this color shifts on mobile devices?  Do you have any suggestions?</p>
<p dir="auto">Thanks a lot,</p>
<p dir="auto">Jörg</p>
]]></description><link>https://forum.qt.io/topic/67311/qpainter-color-shift-red-blue-swapped-on-mobile-devices</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Jul 2026 15:10:43 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/67311.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 21 May 2016 07:39:13 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QPainter Color Shift (red&#x2F;blue swapped) on mobile devices on Mon, 23 May 2016 06:33:17 GMT]]></title><description><![CDATA[<p dir="auto">We use a Samsung SMT710 with Android Version 5.0.2 Patch 20151101</p>
]]></description><link>https://forum.qt.io/post/328958</link><guid isPermaLink="true">https://forum.qt.io/post/328958</guid><dc:creator><![CDATA[JS_caigos]]></dc:creator><pubDate>Mon, 23 May 2016 06:33:17 GMT</pubDate></item><item><title><![CDATA[Reply to QPainter Color Shift (red&#x2F;blue swapped) on mobile devices on Sat, 21 May 2016 22:47:47 GMT]]></title><description><![CDATA[<p dir="auto">Hi and welcome to devnet,</p>
<p dir="auto">Which version of Android are you using ?</p>
]]></description><link>https://forum.qt.io/post/328793</link><guid isPermaLink="true">https://forum.qt.io/post/328793</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Sat, 21 May 2016 22:47:47 GMT</pubDate></item><item><title><![CDATA[Reply to QPainter Color Shift (red&#x2F;blue swapped) on mobile devices on Sat, 21 May 2016 11:27:28 GMT]]></title><description><![CDATA[<p dir="auto">The colour formats should work just fine on Android. One possibility with is always a bug in some seemingly unrelated function, so I would remove and change parameters on every function used, starting with setRenderHint.</p>
]]></description><link>https://forum.qt.io/post/328674</link><guid isPermaLink="true">https://forum.qt.io/post/328674</guid><dc:creator><![CDATA[mvuori]]></dc:creator><pubDate>Sat, 21 May 2016 11:27:28 GMT</pubDate></item></channel></rss>