将图像加载到图片框中Compact 7 Visual Studio 2008 C#.Net 3.5 [英] Loading an image into a picture box Compact 7 Visual Studio 2008 C# .Net 3.5

查看:98
本文介绍了将图像加载到图片框中Compact 7 Visual Studio 2008 C#.Net 3.5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



 我有一个客户的应用程序从磁盘加载图像我发现一些它们没有正确显示。


我使用Compact 7 Visual Studio 2008 C#.Net 3.5。


所以我使用这一行来加载图像。 。


pictureBox2.Image = new Bitmap(fileName);


当sizeMode设置为normal时,这个工作正常。


图像应该是这样的..它是一个BMP(必须转换为PNG才能在此处上传)



当sizeMode设置为stretchImage时,图像的末尾已损坏..



谢谢你的任何帮助。


解决方案

如果您使用"自动调整大小"会怎样?

Hi,

 I have an application at a customer that loads images from disk and I found that some of them are not displaying correctly.

I use Compact 7 Visual Studio 2008 C# .Net 3.5.

So I use this line to load the image..

pictureBox2.Image = new Bitmap(fileName);

This works fine when sizeMode is set to normal.

This is what the image should look like.. Its a BMP ( had to convert to PNG to upload it here)

When the sizeMode is set to stretchImage the end of the image is corrupted..



Thankyou for any help.

解决方案

What happens if you use "AutoSize"?


这篇关于将图像加载到图片框中Compact 7 Visual Studio 2008 C#.Net 3.5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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