How to Export Images from an Image List in VS2005?

落花浮王杯 提交于 2019-12-04 01:32:19
Jason Berkan

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

On codeproject there is example application how to do this.

I've created a new version from Embedded Image Grabber which supports:

  • png images
  • jpg images
  • gif images
  • Save all images at once to a folder

Binary and SourceCode can be found here.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!