[Qt-interest] Enhanced monochrome conversion

M. Bashir Al-Noimi mbnoimi at gmx.com
Thu Nov 26 13:06:15 CET 2009


Oliver.Knoll at comit.ch wrote:

> Andre Somers wrote on Thursday, November 26, 2009 11:47 AM:
>
>   
>>> It's easy to convert any image to monochrome format by using
>>> QImage::convertToFormat like this:
>>> ...
>>>       
>> Hi, interesting problem, but I'd say there is a relatively
>> straitforward way to get an answer: read the GIMP sourcecode
>>     
>
> Or let a dedicated image processing library do the job. ImageMagick (http://www.imagemagick.org) does the trick maybe. It requires some work to convert between QImage and the ImageMagick (I'd recommend the C++ API, http://www.imagemagick.org/Magick++/) http://www.imagemagick.org/Magick++/Image.html, but it is doable (I remember though that I went the "cheap" but reliable way to store the QImage in-memory as PNG, and read it from memory as PNG into the Magick++ Image - but it should be doable by reading the "raw" memory from QImage and put it into the Image, but then you have to take care about memory alignment, colour depth etc.)
>
> Once you have your data into your Magick++ Image object, check out:
>
>   http://www.imagemagick.org/Magick++/Image.html#Image%20Manipulation%20Methods
>   

Thanks for suggestion, but I don't want to dig-in outside from Qt 
because I suffered a lot when I did before. If you read your suggestion 
you can find that conversion process is very hard & tricky.


-----
Best Regards
Muhammad Bashir Al-Noimi
My Blog: http://mbnoimi.net/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091126/9d2b3f63/attachment.html 


More information about the Qt-interest-old mailing list