Problem changing pixel value in a grayscale image in GDI+

S

Sinora

I am trying to cahnge pixel value of a grayscale image using Bitmap object .
Each pixel is consists of 8 bits.

Bitmap bigim(720,480,PixelFormat8bppIndexed) ( I tried 8 instead
PixelFormat8bppIndexed)

I wanted to assign the values of each pixel using

bigim.SetPixel(x,y,integer value between 0 to 255)

This method did not work. I was wondering if anyone knows how to do that.
 
D

David White

Sinora said:
I am trying to cahnge pixel value of a grayscale image using Bitmap object ..
Each pixel is consists of 8 bits.

Bitmap bigim(720,480,PixelFormat8bppIndexed) ( I tried 8 instead
PixelFormat8bppIndexed)

I wanted to assign the values of each pixel using

bigim.SetPixel(x,y,integer value between 0 to 255)

This method did not work. I was wondering if anyone knows how to do that.

This question is off-topic here. Standard C++ knows nothing of bitmaps,
pixels, GDI and grayscales. I can't even suggest where you should take your
question because you haven't mentioned the operating system or compiler you
are using. Maybe this will help: http://www.slack.net/~shiva/welcome.txt

DW
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top