Click here to Skip to main content
15,908,661 members
Home / Discussions / C#
   

C#

 
General8bpp bitmaps in c# Pin
SIDDHARTH_JAIN22-Jun-05 13:39
SIDDHARTH_JAIN22-Jun-05 13:39 
I have say a 100x100 array of gray values (0 to 255). How can I create a 8bpp bitmap from this array such that 0 maps to black 255 maps to white?

In particular how to you set the ColorPalette for a 8bpp image; I want 0 to map to black 255 to white?

I tried following code but its giving me problems:

PixelFormat pf = PixelFormat.Format8bppIndexed;
byte[] Scan0 = CalculateIntensityValues();
Bitmap bmp = new Bitmap(100, 100, 100, pf, Scan0);

how to convert Scan0 from byte[] to IntPtr?
GeneralRe: 8bpp bitmaps in c# Pin
Christian Graus22-Jun-05 18:29
protectorChristian Graus22-Jun-05 18:29 
GeneralCalling word and outlook from c# Pin
KKuehnberger22-Jun-05 13:23
KKuehnberger22-Jun-05 13:23 
GeneralRe: Calling word and outlook from c# Pin
seee sharp22-Jun-05 19:47
seee sharp22-Jun-05 19:47 
GeneralRe: Calling word and outlook from c# Pin
KKuehnberger22-Jun-05 20:02
KKuehnberger22-Jun-05 20:02 
GeneralThe greatest question Saving a linked list Pin
Sasuko22-Jun-05 11:33
Sasuko22-Jun-05 11:33 
GeneralRe: The greatest question Saving a linked list Pin
DavidNohejl22-Jun-05 11:44
DavidNohejl22-Jun-05 11:44 
GeneralRe: The greatest question Saving a linked list Pin
Sasuko22-Jun-05 11:53
Sasuko22-Jun-05 11:53 
GeneralRe: The greatest question Saving a linked list Pin
DavidNohejl22-Jun-05 12:10
DavidNohejl22-Jun-05 12:10 
GeneralRe: The greatest question Saving a linked list Pin
Sasuko22-Jun-05 12:24
Sasuko22-Jun-05 12:24 
GeneralRe: i didn't get what you mean? Pin
kimo_helmy22-Jun-05 20:28
kimo_helmy22-Jun-05 20:28 
GeneralRe: The greatest question Saving a linked list Pin
Anonymous22-Jun-05 22:08
Anonymous22-Jun-05 22:08 
GeneralRe: The greatest question Saving a linked list Pin
DavidNohejl23-Jun-05 0:52
DavidNohejl23-Jun-05 0:52 
GeneralRe: The greatest question Saving a linked list Pin
Sasuko23-Jun-05 6:28
Sasuko23-Jun-05 6:28 
GeneralRe: The greatest question Saving a linked list Pin
DavidNohejl23-Jun-05 6:56
DavidNohejl23-Jun-05 6:56 
GeneralRe: The greatest question Saving a linked list Pin
Sasuko23-Jun-05 7:20
Sasuko23-Jun-05 7:20 
Generalsorting Pin
Moslems22-Jun-05 11:24
Moslems22-Jun-05 11:24 
GeneralRe: sorting Pin
DavidNohejl22-Jun-05 11:56
DavidNohejl22-Jun-05 11:56 
Generallinked lists Pin
Moslems22-Jun-05 11:21
Moslems22-Jun-05 11:21 
GeneralDelete a locked file Pin
nemopeti22-Jun-05 11:06
nemopeti22-Jun-05 11:06 
GeneralRe: Delete a locked file Pin
Dave Kreskowiak22-Jun-05 12:53
mveDave Kreskowiak22-Jun-05 12:53 
GeneralRe: Delete a locked file Pin
nemopeti22-Jun-05 21:12
nemopeti22-Jun-05 21:12 
GeneralRe: Delete a locked file Pin
Dave Kreskowiak23-Jun-05 2:17
mveDave Kreskowiak23-Jun-05 2:17 
GeneralC+ to c# Pin
GoodQuestion22-Jun-05 10:29
GoodQuestion22-Jun-05 10:29 
GeneralRe: C+ to c# Pin
Jeff Martin22-Jun-05 10:47
Jeff Martin22-Jun-05 10:47 

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.