hi,
I want to display an image from an array and that's done;
now i want to zoom in and out which is quite easy with Qt with the code below:
imageLabel = new QLabel;
[...]
QImage image(IMAGE_SIZE, IMAGE_SIZE, QImage::Format_RGB32);
[...]
QRgb value;
[...]
image.setPixel(c, r, value);
[...]
imageLabel->setPixmap(QPixmap::fromImage(image));
[...]
imageLabel->resize(scaleFactor * imageLabel->pixmap()->size());
this made a zooming feature, but when zooming many times i noticed that i didn't
get a classic mosaic effect on pixel ,when the scale factor is great i could get a rectangle area for each pixel...
Instead it seems that Qt made an interpolation between the value of two pixel to fill the space between the pixels with an interpolate color value, more special this value is not always constant and predictable when there is few pixel an a great scale factor.
My question now is of course, is there a way to get a 'simple' mosaic effect without interpolation anymore?
regards,
damien
Bookmarks