View Full Version : Image conversion black and white
offline
24th March 2010, 23:18
How can I turn a picture black and white format.
JohannesMunk
25th March 2010, 01:21
You asked this same question two weeks ago!
What about
image = image.convertToFormat(QImage::Format_Mono);
as aamer4yu suggested?
If you want more control look into the sourceCode in qimage.cpp. ConvertToFormat uses an Image_Converter_Map. The one to mono is called "convert_X_to_Mono", which calls "dither_to_Mono" and uses qGray (perceptual mix of RGB) and a treshold of 128.
If that's not what you are looking for, you need to elaborate more!
Johannes
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.