You are not logged in.

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

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

2

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.

3

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

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

Similar threads

Used tags

qt4.8