title: Saving QPixmap as JPEG results in vertical lines
body: <p>A user installed our application to a server PC, shared the install directory as network drive Z: and now opens the app from different client PCs all over his shop. Everything works fine except for a naggling bug on one of the PCs:</p>
  
  <p>On the Problem PC, the app can load <code>.jpg</code> files for inventory items just fine and show the corresponding QPixmap in a QLabel. When the inventory item he is currently viewing does not yet have an image assigned to it, he can open a file dialog, choose an image and display that correctly. However, <em>saving</em> the (new/changed) QPixmap as a <code>.jpg</code> stores it to disc as a series of colored vertical lines on a black background:</p>
  
  <p><img src="https://i.stack.imgur.com/ndXEz.jpg" alt="(this should actually be some jewellery)"></p>
  
  <p>Saving is done via <code>QPixmap::save( const QString &amp; fileName, ...)</code> with the file name set programmatically to "<code>&lt;some_id&gt;.jpg</code>" to designate the desired file format. Returns <code>true</code>, but the resulting file looks like modern art.</p>
  
  <p>However, saving images works fine on the server and the other clients.</p>
  
  <p>Both the server and the Problem PC run Windows XP at an identical patch level.</p>
  
  <p>Process Explorer shows identical DLLs for the app process on server and Problem PC except for the Problem PC using <code>dnsapi.dll</code>, which the server doesn't.</p>
  
  <p>Process Explorer also shows that on both server and client the Qt DLL used to deal with JPEGs is
  <code>\Device\LanmanRedirector\&lt;server&gt;\&lt;app&gt;\plugins\imageformats\qjpeg4.dll</code>, and a drive-wide search on the Problem PC for <code>qjpeg*.dll</code> came up empty, so the app <em>should</em> use the same JPEG handling code on both computers.</p>
  
  <p>Any suggestions?</p>
  
  <p><em>(EDIT: added OS and patch status to problem description.)</em></p>
  
  <p><strong>EDIT: Solution:</strong> on the problem machine we had a 16 bpp colour depth. Setting that to 32 bpp solved our problem instantly. I also replaced <br/>
  <code>     _pm.save( sDestFileName )</code><br/>
  with<br/>
  <code>     _pm.toImage().convertToFormat( QImage::Format_RGB32 ).save( sDestFileName )</code><br/>
  so that we won't run into this on every old client PC running less than 32 bpp.</p>