Re: Convert an Image to 8-bit grayscale

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



<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


.



Relevant Pages

  • RE: HOW to display raw YUV data -----(problem still )???
    ... > The pixels of each line and lines in one frame is known for me. ... That being said, "converting" from one YUV format to another is very easy, ... alpha channel--we'll just skip over it. ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: why 1680x1050 ?
    ... Quite a few of the earlier HD plasma screens have a ... a 16:9 panel which has a native format (a ... as "pixels" to begin with, so the panel format is mostly ... somewhat of a better match to PC standard formats (if ...
    (comp.sys.ibm.pc.hardware.video)
  • Re: Excel CopyPicture and PowerPoint
    ... Appearance as onscreen I guess means all ... > distortion if you resize the chart, and you can ungroup the chart in the ... > Printer format means bitmap, jpg, png, or gif, any format that converts ... > pixels in the image no longer line up with the pixels in the screen. ...
    (microsoft.public.excel.charting)
  • Re: video/image gets flipped by video renderer
    ... but after it transitions to "run", I'm sent a new format of 768x-480 UYVY. ... I have to copy my 720 pixels to the leftmost 720 pixels of this new ... I manually added Color Converter and the image is still flipped, ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: What Comprises a "Pixel"?
    ... > Finally, if this is the case, and I switch to grayscale capture mode, ... the green pixel doesn't necessarily produce green. ... If the red and blue pixels ...
    (rec.photo.digital)