QImage::scaled alters image format
-
When I'm doing
@image.scaled(size, Qt::IgnoreAspectRatio, Qt::SmoothTransformation)@
on a grayscale image (depth() == 8) I'm getting an image with depth() == 32 which leads to serious memory layout issues for my algorithm. Is it a bug? It's not a documented effect. How can I resize a QImage without altering its format?
-
Hi,
Can you try without SmoothTransformation ?
-
Hi,
Yes, that works, thank you. Not an ideal solution at all, but better than nothing. -
AFAIK, the smooth transformation does a format adaptation to create a good looking output and use optimized algorithm for that. Depending from where you image come from you can try doing the scaling before using QImage