如何在.bmp文件中捕获图像 [英] How do I capture an image in a .bmp file
问题描述
我想在.bmp文件中捕获图像.我的程序会为图像生成一个完整的自上而下的32位像素字符串,然后使用BitBlt将其发送到视频适配器.我一直以为我可以将标头附加到像素列表并将其保存为.bmp文件,而无需付出任何努力.
昨天,当我终于解决了这个问题时,我发现这是Petzold并没有带领我快速找到解决方案的那一次.有人可以将我指向正确的标题,以将32位像素列表转换为.bmp文件吗?自上而下的组织会导致倒立的形象吗?如果是这样,我认为.我可以使用BitBlt将字符串重铸为自下而上的列表.
是吗?
I want to capture an image in a .bmp file. My program generates a complete top-down 32-bit pixel string for the image and sends that to the video adapter with BitBlt. I have always assumed I could attach a header(s) to the pixel list and save it as a .bmp file with just a little effort.
When I finally got around to it yesterday, I found that this is the one time that Petzold didn''t lead me to a solution quickly. Can someone point me to the right headers to convert the 32-bit pixel list into a .bmp file? Will the top-down organization result in an upside down image? If so I assume. I can recast the string into a bottom-up list with BitBlt.
Right?
推荐答案
MSDN
可能对您感兴趣: [
MSDN
could be of some interest for you: "Capturing an Image"[^].
这篇关于如何在.bmp文件中捕获图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!