保存的位图比位图我读C#大 [英] saved bitmap is larger than the bitmap i read C#

查看:109
本文介绍了保存的位图比位图我读C#大的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

实际创建位图有一个文件的大小比输入位图大。我打开创建的位图,它看起来什么,我输入的完全不同。这是为什么?

Actually the bitmap created has a file size larger than the input bitmap. I opened the bitmap that was created and it looked completely different to what i inputted. why is that ?

我通读的FileStream一个位图,然后我写它的内容object.Next我写它作为一个位图文件到硬盘位图。我无法弄清楚为什么输出位图比输入位图大。可能有人请帮助我。

I read a bitmap through FileStream and then i write its contents to a bitmap object.Next i write it as a bitmap file onto harddisk. I cant figure out why the output bitmap is larger than the input bitmap. Could someone please help me.

推荐答案

位图。保存(Image.Save)将默认情况下,将图像保存为PNG格式。

Bitmap.Save (Image.Save) will, by default, save the image as in PNG format.

如果你调用保存用的imageformat值,你应该得到位图。

If you call Save with an ImageFormat value, you should get your bitmap.

b.Save("test.bmp", ImageFormat.Bmp);

这篇关于保存的位图比位图我读C#大的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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