Re: Convert an Image to 8-bit grayscale
- From: "Peter Duniho" <NpOeStPeAdM@xxxxxxxxxxxxxxxx>
- Date: Fri, 24 Nov 2006 00:14:53 -0800
<platinumhimani@xxxxxxxxx> wrote in message
news:1164352325.591069.85240@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[...]
, then the pixel format comes out to be 32 bit..non-grayscale...It just
doesn't seem to save correctly..The file generated when saved using the
bitmap's save method..doesn't even open in Photo editor..(It shows an
error)
--> My question is how to save this grayscale file in 8 bits.
and i have a new question...
How do i convert a 24-bit image to 8-bit image (no grayscaling) and
vice-versa.....and save it as 24/8 bit..(should save correctly).
I don't know the answer to that one. My limited experience with the .NET
bitmap image support is that 8-bit and 16-bit images have little if no real
support. For sure, the "to grayscale" code here only converts colored
pixels to grayscale ones, but the image format remains the same. The image
is still a color format...it just doesn't have any non-grayscale pixels in
it after the conversion.
Whether that has anything to do with the problem you're having with saving
the file, I don't know. I haven't tried to use .NET to save out any image
bitmaps, so I'm not familiar with how well it works (or doesn't :) ).
For what it's worth, the bitmap image formats aren't very complicated. As
long as you didn't want compression, you should be able to write your own
file output code without too much trouble.
Pete
.
- Follow-Ups:
- Re: Convert an Image to 8-bit grayscale
- From: Lucian Wischik
- Re: Convert an Image to 8-bit grayscale
- References:
- Convert an Image to 8-bit grayscale
- From: platinumhimani
- Re: Convert an Image to 8-bit grayscale
- From: platinumhimani
- Re: Convert an Image to 8-bit grayscale
- From: platinumhimani
- Re: Convert an Image to 8-bit grayscale
- From: Peter Duniho
- Re: Convert an Image to 8-bit grayscale
- From: platinumhimani@xxxxxxxxx
- Convert an Image to 8-bit grayscale
- Prev by Date: DirectX or xna
- Next by Date: Re: Q: Tip and advice on DataBase related question.
- Previous by thread: Re: Convert an Image to 8-bit grayscale
- Next by thread: Re: Convert an Image to 8-bit grayscale
- Index(es):
Relevant Pages
|