PictureBox1.Image.Save-仅.PNG可以正常工作 [英] PictureBox1.Image.Save - Only .PNG Works Properly

查看:157
本文介绍了PictureBox1.Image.Save-仅.PNG可以正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能够以.png格式正确保存图片盒中的图像,但不能使用.jpg或.gif格式.我得到的是只有.jpg和.gif的黑色图像.图片框具有白色背景,上面有文字和线条,这些都是我通过VB编码生成的.

I am able to save images from a picturebox in the .png format properly, but not using .jpg or .gif formats. What I get is a black image only with .jpg and .gif. The picturebox has a white background with text and lines on it which I generate via VB coding.

我正在运行Win 2K和VB2005.有什么建议吗?

I am running Win 2K and VB 2005. Any suggestions?

谢谢

Titus505

代码示例:

GraphicOutputs.PictureBox1.Image.Save( " c:\ graphics \" & TextBox1.文字& ".png" ,ImageFormat.Png)

GraphicOutputs.PictureBox1.Image.Save("c:\graphics\" & TextBox1.Text & ".png", ImageFormat.Png)

推荐答案

mmmm ...没有错误?

. PictureBox1 . 图像 . 保存 ( " C:\ MyImage.jpg" ImageFormat . Jpeg )

mmmm...no errors?

Me.PictureBox1.Image.Save("C:\MyImage.jpg", ImageFormat.Jpeg)

似乎工作正常……尽管我运行的是XP和VS05

seems to work just fine...although I'm running XP and VS05


这篇关于PictureBox1.Image.Save-仅.PNG可以正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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