Click here to Skip to main content
16,006,341 members
Home / Discussions / Graphics
   

Graphics

 
GeneralRe: 2D Line (XNA) [modified] Pin
MasterSharp13-Jan-08 11:03
MasterSharp13-Jan-08 11:03 
GeneralDrawing Outside The Form Pin
The ANZAC11-Jan-08 16:53
The ANZAC11-Jan-08 16:53 
GeneralRe: Drawing Outside The Form Pin
Dave Kreskowiak14-Jan-08 7:46
mveDave Kreskowiak14-Jan-08 7:46 
GeneralRe: Drawing Outside The Form Pin
The ANZAC14-Jan-08 12:30
The ANZAC14-Jan-08 12:30 
GeneralRe: Drawing Outside The Form Pin
Smithers-Jones28-Feb-08 7:54
Smithers-Jones28-Feb-08 7:54 
Question3D mesh material Pin
Raza568010-Jan-08 12:29
Raza568010-Jan-08 12:29 
GeneralRe: 3D mesh material Pin
Californian210-Jan-08 12:36
Californian210-Jan-08 12:36 
GeneralUsing 8 bit-per-pixel grayscale bitmaps with GDI+ Pin
Californian210-Jan-08 12:28
Californian210-Jan-08 12:28 
I'm using GDI+, and want to edit the pixels of an 8 bit-per-pixel, grayscale bitmap which I read from a file. I can get the pixels using the Bitmap::LockBits and BitmapUnlockBits methods and a BitmapData object. However, there doesn't seem to be any support for 8 bit-per-pixel bitmaps that do not necessarily use a palette (i.e. grayscale).

I see that the pixel format can be set to PixelFormat8bppIndexed, and used along with a palette (the palette type can even be set to PaletteFlagsGrayScale). However, it is unnecessary to use a palette with these bitmaps, as the palette just contains all possible gray levels. It seems inefficient to have to associate a palette with these bitmaps and pass it back and forth each time the pixels are retrieved (the pixels are frequently and repeatedly passed back and forth for editing in my program).

Does anyone know:

1) Are there any other flags or methods for using BitmapData objects with 8 bit-per-pixel grayscale bitmaps but without a palette?

2) When the PaletteFlagsGrayScale flag is used, can I assume the palette entries are always the same (all possible gray levels)? Or can they be re-scaled? (I understand that these entries are DWORDs using alpha | red | green | blue, with the red, green and blue values equal to each other.)

Thanks!

Smile | :)
GeneralPictureBox using too much memory Pin
gembob4-Jan-08 6:08
gembob4-Jan-08 6:08 
GeneralRe: PictureBox using too much memory Pin
Luc Pattyn4-Jan-08 7:52
sitebuilderLuc Pattyn4-Jan-08 7:52 
GeneralRe: PictureBox using too much memory Pin
Pete O'Hanlon4-Jan-08 10:37
mvePete O'Hanlon4-Jan-08 10:37 
GeneralRe: PictureBox using too much memory Pin
Luc Pattyn4-Jan-08 11:01
sitebuilderLuc Pattyn4-Jan-08 11:01 
GeneralRe: PictureBox using too much memory Pin
Pete O'Hanlon5-Jan-08 9:48
mvePete O'Hanlon5-Jan-08 9:48 
GeneralRe: PictureBox using too much memory Pin
Luc Pattyn5-Jan-08 11:34
sitebuilderLuc Pattyn5-Jan-08 11:34 
GeneralRe: PictureBox using too much memory Pin
Luc Pattyn5-Jan-08 11:47
sitebuilderLuc Pattyn5-Jan-08 11:47 
GeneralRe: PictureBox using too much memory Pin
gembob9-Jan-08 3:40
gembob9-Jan-08 3:40 
GeneralRe: PictureBox using too much memory Pin
Luc Pattyn9-Jan-08 4:22
sitebuilderLuc Pattyn9-Jan-08 4:22 
GeneralRe: PictureBox using too much memory Pin
gembob1-Feb-08 7:22
gembob1-Feb-08 7:22 
GeneralRe: PictureBox using too much memory Pin
Luc Pattyn1-Feb-08 10:12
sitebuilderLuc Pattyn1-Feb-08 10:12 
GeneralRe: PictureBox using too much memory Pin
gembob4-Feb-08 3:38
gembob4-Feb-08 3:38 
GeneralRe: PictureBox using too much memory Pin
Luc Pattyn4-Feb-08 4:54
sitebuilderLuc Pattyn4-Feb-08 4:54 
GeneralHelp Required : Creating DIBSection from raw image data ( Searched all possible forums, could not find answer ) Pin
Sharath Jagannath3-Jan-08 20:49
Sharath Jagannath3-Jan-08 20:49 
GeneralRe: Help Required : Creating DIBSection from raw image data ( Searched all possible forums, could not find answer ) Pin
Mark Salsbery4-Jan-08 8:00
Mark Salsbery4-Jan-08 8:00 
GeneralRe: Help Required : Creating DIBSection from raw image data ( Searched all possible forums, could not find answer ) Pin
Sharath Jagannath6-Jan-08 19:15
Sharath Jagannath6-Jan-08 19:15 
Questionopengl 1.2 Pin
Dr Willy2-Jan-08 22:25
Dr Willy2-Jan-08 22:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.