生成BMP图像但显示倒置
我通过winddk生成了bitmap.dll。
手动添加为打印机驱动程序,选择打印到文件驱动程序。
使用它,我使用文件中的打印命令创建文档的图像。
我能够创建图像并查看它,但问题是我得到了倒置(镜像)图像。
cScans = pOemPDEV->bmInfoHeader.biHeight;
// Flip the biHeight member so that it denotes top-down bitmap
pOemPDEV->bmInfoHeader.biHeight = cScans * -1;
有没有人解决此代码?当我评论(以正确生成标题)这一行时遇到问题。
I have generated bitmap.dll through winddk.
Added manually as a printer driver selecting print-to-file driver.
Using this I create an image of my document using print command from file.
I am able to create image and view it, But the problem is that I get inverted(mirror) image.
cScans = pOemPDEV->bmInfoHeader.biHeight;
// Flip the biHeight member so that it denotes top-down bitmap
pOemPDEV->bmInfoHeader.biHeight = cScans * -1;
Have anyone workaround of this code? As I get the problem when I comment(to get header properly generated) this lines.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
设备独立位图被记录为布置在内存中,底线位于缓冲区的开头。这是 OS/2 设计者在笛卡尔坐标系中进行的一项实验,他们在开发 Windows 3 的同时与 Microsoft 合作。
有两种可能的修复方法:
Device Independent Bitmaps are documented as being laid out in memory with the bottom line at the start of the buffer. Its an experiment in cartesian co-ordinates perpetrated by the designers of OS/2 who were working with Microsoft at the same time Windows 3 was being developed.
There are two possible fixes: