You are not logged in.


Tuesday, May 29th 2012, 5:22pm

Could I transform the format of the QImage to another format?

I am doing a test with QImage, I want to transform the
QImage::Format_ARGB32 to different format.
Could I do this by Qt?Thanks


Tuesday, May 29th 2012, 6:33pm

I don't know. If only there was a manual...
If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.


Wednesday, May 30th 2012, 6:16pm

Thanks, I should look carefully about the manual before I ask.
This will transform the image to the format you want.

Source code

src = src.convertToFormat(QImage::Format_RGB16);

Similar threads

Used tags