I want to make a program that takes a screencapture and saves it to jpg.. Any advice on where to start looking ? =) //Phrekie
Posted on 2001-06-11 20:10:00 by Phrekie
Phrekie, There was a link posted here recently for a jpg library, so search the messages board for that bit. The next thing you need is to get a bitmap of the current screen, you can do this by calling GetDesktopWindow() then call GetDC, to get the Device context of the screen. How you have to make a memory DC to copy it into, this is easy call CreateCompatibleDC to get a compatible DC. The final bit you have to do is select a bitmap into the memory DC before you bitblt from the screen DC. so get the width and height of the screen, and call CreateCompatibleBitmap, to create your bitmap, then call SelectObject to place it in your Memory DC, now simply BitBlt from the Screen to your Memory DC. Now the Memory DC has a copy of the screen, hopefully the jpg library can use that, or the bitmap. umbongo
Posted on 2001-06-12 05:31:00 by umbongo
Thnx =) I think I'll get it to work. I saw that jpg port right after I sent my post =) //Phrekie
Posted on 2001-06-12 07:45:00 by Phrekie
Thanks umbongo. I ported an old screen-magnifying applet from C to ASM, bit-blt from screen to window worked, but I couldn't see how to save the bmp to a file. I'll go back and upgrade it.
Posted on 2001-06-12 11:11:00 by Larry Hammick