[Qt-interest] how to build a grayscale QImage

hakiim the dream hakiim35 at hotmail.com
Mon Feb 22 09:47:22 CET 2010


But no QImage constructor take a data pointer and a color table together.Besides, how can i create a grayscale color table? should i set a for loop from 1 to 256 and set the current entry of color table with the current index of the loop?I get confused with the Format enum. It just supports mono(0-1) and 8bit indexed; why not a "grayscale" option to make things easier? 

> Date: Thu, 18 Feb 2010 14:36:15 +0100
> From: samuel.rodal at nokia.com
> To: hakiim35 at hotmail.com
> CC: qt-interest at trolltech.com
> Subject: Re: [Qt-interest] how to build a grayscale QImage
> 
> ext hakiim the dream wrote:
> > Hi all, 
> > i have a 8-bit grayscale image, say a 2-D matrix of intensity values 
> > represented by a unsigned char pointer. My aim is to form a QImage with 
> > this data.
> > How can i do this? In the documentation, it is told that QImage supports 
> > mono(0-1) and 8-bit indexed images by a color table.
> 
> Create a grayscale color table, and use one of the QImage constructors 
> where you pass in your own data pointer.
> 
> --
> Samuel
 		 	   		  
_________________________________________________________________
Yeni Windows 7: Gündelik işlerinizi basitleştirin. Size en uygun bilgisayarı bulun.
http://windows.microsoft.com/shop
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100222/eb209377/attachment.html 


More information about the Qt-interest-old mailing list