如何从在VS2005的图像列表导出图片? [英] How to Export Images from an Image List in VS2005?

查看:216
本文介绍了如何从在VS2005的图像列表导出图片?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Visual Studio 2005,是有办法的图像导出图像列表,以我的电脑上的单个文件?使用IDE,我选择图像列表,并查看其属性。在图像属性,我启动图像集合编辑器对话框。我只能添加和删除图像,但我无法找到一个方法来输出图像已在列表中。

Using Visual Studio 2005, is there a way to export the images in an Image List to individual files on my PC? Using the IDE, I select the Image List and view its properties. In the "Images" property, I launch the Images Collection Editor dialog. I can only add and remove images, but I cannot find a way to export an image that is already in the list.

为什么呢?谁提出的原始列表的开发商已离开我们公司,我需要为ASP.NET应用程序中的图像(将转换为JPEG格式)。

Why? The developer who made the original list has left our company and I need the images for an ASP.NET application (will convert to .jpeg).

感谢您的帮助!

推荐答案

您可以写一些简单的code导出图像。你的语言你正在使用,所以这里是在C#和VB的解决方案没有提及。

You can write some simple code to export the images. You don't mention which language you are using, so here is the solution in both C# and VB.

C#

for (int x = 0; x < imageList1.Images.Count; ++x)
{
    Image temp = imageList1.Images[x];
    temp.Save("image" + x + ".bmp");
}

VB

For x As Integer = 0 To imageList1.Images.Count - 1
    Dim temp As Image = imageList1.Images(x)
    temp.Save("image" & x & ".bmp")
Next

这篇关于如何从在VS2005的图像列表导出图片?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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