Dev S Shrestha wrote:
I created a grayscale image
Bitmap img(320,240,PixelFormat8bppIndexed);
I want to set the BYTE values to each of the pixels using
img.SetPixel(x,y,v);
where v is a BYTE value between 0 and 255
It did not work.
Any solution?
Yes, please post the smallest amount of compilable code
that demonstrates your issue. Please state the expected
behavior as well as the actual behavior. Do not attach
the code, just past it into your posting.
Please read the FAQ and Welcome.Txt below for instructions
on how to post.
One reason that your call:
img.SetPixel(x,y,v);
did not 'work' is because x, or y may be out of range.
There may be many other reasons too, but since you did
not post any code, the world will never know.
By the way, the C++ language does not have facilities
for bitmaps and pixels. You need to ask the experts
in a newsgroup about your compiler or platform. There
are many listed in the C++ FAQ and Welcome.TXT listed
below.
--
Thomas Matthews
C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq:
http://www.parashift.com/c++-faq-lite
C Faq:
http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book