Hi Sharon,
Thanks for your update! :)
We really appreciate your taking the time to provide us with feedback on
how you were successful in resolving this issue. I think this invaluable
experience can benefit others in the newsgroup facing this issue. Thanks
for your knowledge sharing!
Best Regards,
Terry Fei [MSFT]
Microsoft Community Support
Get Secure!
www.microsoft.com/security
--------------------
Thread-Topic: Converting 8bpp raw data to a 32bppArgb Bitmap
thread-index: AcY8PS1ArfHdre8oS4COkBfiDyMlEA==
X-WBNR-Posting-Host: 199.203.93.141
From: =?Utf-8?B?U2hhcm9u?= <Sh*****@newsgroups.nospam>
References: <61**********************************@microsoft.co m>
<Om**************@TK2MSFTNGXA03.phx.gbl>Subject: RE: Converting 8bpp raw data to a 32bppArgb Bitmap
Date: Tue, 28 Feb 2006 00:01:27 -0800
Lines: 18
Message-ID: <1C**********************************@microsoft.co m>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.languages.csharp
Path: TK2MSFTNGXA03.phx.gbl
Xref: TK2MSFTNGXA03.phx.gbl microsoft.public.dotnet.languages.csharp:388830
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
I know the FreeImage and I'm using it. But it's not good for me in this
case.But I did found a simple way to do that:
(1) Create a Bitmap with the same size of the source image (buffer) but
withFormat32bppArgb pixel format.
(2) Use the created bitmap graphics and draw the source image (8bpp pixel
format) onto the newly created bitmap.
Note: The raw data buffer that contains the 8bpp image data can be taken
from a Bitmap with Format8bppIndexed pixel format, then it can be written
with the relevant data, and by using my above procedure, it can be
convertedto Format32bppArgb bitmap.
that is it.
-------
Thanks
Sharon