图片的拆分
来源:互联网 发布:数据库开发案例 编辑:程序博客网 时间:2024/05/12 07:17
图片的拆分
1、保存png图片
using System;
using System.Collections.Generic;using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Drawing.Imaging;
namespace TestGifSplit
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
try
{
string path = System.IO.Path.Combine(Application.StartupPath, "123.gif");
//string path = System.IO.Path.Combine(Application.StartupPath, "Test.GIF");
Image ima = Image.FromFile(path);
FrameDimension fd = new FrameDimension(ima.FrameDimensionsList[0]);
int count = ima.GetFrameCount(fd);
for (int xt = 0; xt < count; xt++)
{
ima.SelectActiveFrame(fd, xt);
ima.Save(string.Format(Application.StartupPath + "\\Frame{0}.png", xt), ImageFormat.Png);
}
MessageBox.Show("保存完成", "信息提示:");
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(), "信息提示:");
throw;
}
}
}
}
2、保存其他格式图片
只要把格式修改一下即可。
0 0
- 图片的拆分
- 图片域名拆分策略
- winfrom-图片拆分成多块
- 多帧Dcm图片的读取与拆分存储
- 接上面的拆分图片,这个是把刚才拆分的图片重新合成为原图片
- 批量拆分图片透明通道
- 数据库的分库分表拆分:垂直拆分,水平拆分
- 什么是基金拆分?拆分的基金好不好?
- 表的垂直拆分和水平拆分
- 表的垂直拆分和水平拆分
- mysql的水平拆分和垂直拆分
- 表的垂直拆分和水平拆分
- 数据库的水平拆分和垂直拆分
- 数据库的水平拆分与垂直拆分
- 表的垂直拆分和水平拆分
- mysql的水平拆分和垂直拆分
- 【9秒成员自研开源】开源拆分tp打包图片资源的工具,,手游换皮利器
- 数的拆分
- JavaScript的作用域链
- 多线程设计模式——最后总结
- 访问url激活功能脚本
- centos6.5修改本地yum源
- 【9301】走楼梯
- 图片的拆分
- 数据库事务
- typedef的用法总结
- linux capability
- 新建android项目时总是出错“The import android.support.v7 cannot be resolved”
- poj 2991 Traveling by Stagecoach
- LeetCode:Symmetric Tree(镜像二叉树)
- Boost log库的使用
- 欢迎使用CSDN-markdown编辑器