View an image with API32

J

Joan

Hi!

Im working with C++ & win API32.

My Problem:

I have in a matrix of unsigned chars the colours (in RGB format) of
an image. The dimensions of the image are 720 x 576 (cols x rows). So
the size of the matrix is 720*576*3 bytes (unsigned chars).

My pogram has to show that image in the Main Window. But I don't
know how show i efficiently. By now, I have one SetPixel(...) function
for every pixel :D so it is not "immediately" and you can see how the
image "grows up" :( How can I show the total image with one function
call? BitBlt() is the solution? Using BitBlt() I dont know what is
"handle to source DC" in front of my data image matrix.

Thanks a lot! ;)
 
V

Victor Bazarov

Joan said:
Im working with C++ & win API32.

I can't vouch for c.g.a, but in c.l.c++ you're off-topic. The problem
you have is not of a language kind.
My Problem:

I have in a matrix of unsigned chars the colours (in RGB format) of
an image. The dimensions of the image are 720 x 576 (cols x rows). So
the size of the matrix is 720*576*3 bytes (unsigned chars).

My pogram has to show that image in the Main Window. But I don't
know how show i efficiently. By now, I have one SetPixel(...) function
for every pixel :D so it is not "immediately" and you can see how the
image "grows up" :( How can I show the total image with one function
call? BitBlt() is the solution? Using BitBlt() I dont know what is
"handle to source DC" in front of my data image matrix.

A much better newsgroup to ask your question would be
comp.os.ms-windows.programmer[.win32]. And, of course, your image
creation on-the-fly and drawing it in a window is _undoubtedly_ covered
in every Windows programming book.

V
 

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

No members online now.

Forum statistics

Threads
474,181
Messages
2,570,970
Members
47,537
Latest member
BellCorone

Latest Threads

Top