title: How to ensure even pixel size when painting scaled QImage?
body: <p>I have a 4 channel png image with 8x8 Pixels that is loaded by a <code>QImage</code>. The <code>QImage</code> is then scaled by a factor of 200, so the image will have a new resolution of 1600x1600, each original pixel having a size of 200x200. But when this image is added to a <code>QLabel</code> through the means of a <code>QPixmap</code> and shown on screen, the drawn pixels will have slightly different sizes.</p>
  
  <p>I've taken screenshots with <code>Gimp</code> and looked at the painted image more closely. It seems that every other pixel is slightly bigger than it should be, 201 instead of 200 pixels wide for example. The very last pixel in a row will then be smaller to compensate, so that the entire image has the correct size in the end.</p>
  
  <p>This does not happen for all scaling factors, 100 is fine for example and so are factors that are a power of 2, such as 256.</p>
  
  <p>My original approach was using a <code>QGraphicsView</code> and a <code>QGraphicsPixmapItem</code> in which case I scaled the GraphicsItem instead of the image. The effect was the same.</p>
  
  <p>What effect am I seeing here? And what, if anything, can be done about it?</p>
  
  <p>The code to reproduce this issue is very straightforward</p>
  
  <pre><code>int scale = 200;
  image = QImage("some image file");
  QPixmap pixmap = QPixmap::fromImage(image.scaled(image.size() * scale));
  some_label-&gt;setPixmap(pixmap);
  </code></pre>