如何储存转换为1bpp对Compact Framework的单色BMP文件的位图? [英] How store a bitmap converted to 1bpp to a monochrome bmp file on the Compact Framework?

查看:271
本文介绍了如何储存转换为1bpp对Compact Framework的单色BMP文件的位图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

成功地转换为24位的位图转换为1比特位图后,我碰到问题,即当余存储该位图作为文件是24位再次,而不是1比特(单色)图像。

我需要它真的是一个1位的位图文件发送到蓝牙打印机。

这是如何做到这一点的任何想法或code-片段?

编辑:目前,我用下面的code保存位图:

  System.Drawing.Bitmap.Save(路径\ FileName.bmp
                           System.Drawing.Imaging.ImageFormat.Bmp)
 

解决方案

在网上我看到一对夫妇的方式来做到这一点的Compact Framework的:

我没有一个CF安装方便,否则我会一直张贴尝试过的解决方案。

After converting a 24-bit bitmap successfully into a 1-bit bitmap, I run into the problem that when I store the bitmap as file it is 24-bit again and not a 1-bit (monochrome) image.

I need it to really be a 1-bit bitmap file for sending it to a Bluetooth printer.

Any ideas or code-snippets on how to do this?

EDIT: Currently, I'm using the following code to save the bitmap:

System.Drawing.Bitmap.Save("Path\FileName.bmp", 
                           System.Drawing.Imaging.ImageFormat.Bmp) 

解决方案

On the internet I see a couple of ways to do this on the Compact Framework:

I don't have a CF installation handy, otherwise I would've tried the solutions before posting them.

这篇关于如何储存转换为1bpp对Compact Framework的单色BMP文件的位图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆