[Qt-interest] How to show Mono8 images?

BRM bm_witness at yahoo.com
Wed Jul 28 15:32:10 CEST 2010


I can confirm that technique works as I have the same situation and that is 
exactly what I do.

Ben


>
>From: Albert Graells Rovira <txandi at gmail.com>
>To: 董隆超 <donglongchao at 163.com>
>Cc: Qt Devel <qt-interest at trolltech.com>
>Sent: Wed, July 28, 2010 7:20:54 AM
>Subject: Re: [Qt-interest] How to show Mono8 images?
>
>Hi,
>
>To work with gray images:
>
>Create a QImage (sharing the data buffer) and set the format to 
>QImage::Format_Indexed8. Then, apply a color table to this QImage (with 
>setColorTable). The table must have 256 elements and the N_th element of the 
>table should be equal to qRgb(N,N,N). The same technique should work for 8bit 
>mono images.
>
>Regards,
>
>
>
>
>2010/7/28 董隆超 <donglongchao at 163.com>
>
>
>>
>>
>>
>>
>>>董隆超 schrieb:
>>>> Hi,
>>>>
>>>> I am trying to show images from CCD with Mono8(8 bits per pixel) 
>>>> format .But I find QT only support Mono(1 bit per pixel) adn MonoLSB(1 
>>>> bit per pixel).
>>>> So is there a way to show them?
>>>> Thans a lot.
>>>I would be also really interested in such a grayscale format. I am using 
>>>a mono camera and convert the buffer to a different buffer in rgb 
>>>format, so that I can use it with QImage directly. But this is time 
>>>consuming and should not be necessary.
>>>
>>>Matthias
>>
>>
>>I also try to convert it into RGB32 format and it works well except time and CPU 
>>problem.I think QT may need to support such format.It is not a hard work for 
>>them.Or may be there is some special way we do not know to handle Mono8.:)
>>
>>
>>Longchao
>>
>>
>>
________________________________
 网易邮箱,没有垃圾邮件的邮箱。 
>>_______________________________________________
>>Qt-interest mailing list
>>Qt-interest at trolltech.com
>>http://lists.trolltech.com/mailman/listinfo/qt-interest
>>
>>
>
>
>-- 
>albert
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100728/aeb65200/attachment.html 


More information about the Qt-interest-old mailing list