为图片添加水印

利用.net中System.Drawing命名空间下的常用类我们就可以轻松的为图片添加文字水印和图片水印,并且可以自定义水印文字和水印图片的大小、位置、颜色、透明度等等!对于jpg或者png等图片,可以直接通过Graphics g= Graphics.FromImage(image)来获得Graphics对象,但对于gif图片,通过这种方法无法获得Graphics对象,解决这个问题的方法是首先根据.gif文件的大小生成一个位图作图区,然后将原图复制到作图区,做进行处理,以下是水印添加类的完整代码:

None.gifusing System;
None.gif
using System.Drawing;
None.gif
using System.Drawing.Imaging;
None.gif
using System.IO;
None.gif
using System.Drawing.Drawing2D;
None.gif
None.gif
namespace JillZhang
ExpandedBlockStart.gifContractedBlock.gif
dot.gif{
InBlock.gif    
public enum MarkType
ExpandedSubBlockStart.gifContractedSubBlock.gif    
dot.gif{
InBlock.gif        Text,Image
ExpandedSubBlockEnd.gif    }

ExpandedSubBlockStart.gifContractedSubBlock.gif    
/**//// <summary>
InBlock.gif    
/// 给图片添加水印得类得描述
ExpandedSubBlockEnd.gif    
/// </summary>

InBlock.gif    public class WaterMark
ExpandedSubBlockStart.gifContractedSubBlock.gif    
dot.gif{
ContractedSubBlock.gifExpandedSubBlockStart.gif        
---------------------成员变量---------------------#region ---------------------成员变量---------------------        
InBlock.gif        
private string _text="";
InBlock.gif        
private string _imgPath="";
InBlock.gif        
private int _markX=0;
InBlock.gif        
private int _markY=0;
InBlock.gif        
private float _transparency=1;
InBlock.gif        
private string _fontFamily="宋体";
InBlock.gif        
private Color _textColor=Color.Black;
InBlock.gif        
private bool _textbold=false;
ExpandedSubBlockStart.gifContractedSubBlock.gif        
int[] sizes=new int[]dot.gif{48,32,16,8,6,4};
InBlock.gif        
private Image _image=null;
InBlock.gif        
private Image _markedIamge=null;
InBlock.gif        
private MarkType _markType=MarkType.Text;
ExpandedSubBlockEnd.gif        
#endregion

InBlock.gif
ContractedSubBlock.gifExpandedSubBlockStart.gif        
---------------------构造函数---------------------#region ---------------------构造函数---------------------
ExpandedSubBlockStart.gifContractedSubBlock.gif        
/**//// <summary>
InBlock.gif        
/// 实例化一个水印类
ExpandedSubBlockEnd.gif        
/// </summary>

InBlock.gif        public WaterMark()
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
InBlock.gif            
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockStart.gifContractedSubBlock.gif        
/**//// <summary>
InBlock.gif        
/// 初始化一个只添加文字水印得实例
InBlock.gif        
/// </summary>
InBlock.gif        
/// <param name="text">水印文字</param>
InBlock.gif        
/// <param name="fontFamily">文字字体</param>
InBlock.gif        
/// <param name="bold">是否粗体</param>
InBlock.gif        
/// <param name="color">字体颜色</param>
InBlock.gif        
/// <param name="markX">标记位置横坐标</param>
ExpandedSubBlockEnd.gif        
/// <param name="markY">标记位置纵坐标</param>

InBlock.gif        public WaterMark(string text,string fontFamily,bool bold,Color color,int markX,int markY)
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{    
InBlock.gif            
this._markType=MarkType.Text;
InBlock.gif            
this._text=text;
InBlock.gif            
this._fontFamily=fontFamily;
InBlock.gif            
this._textbold=bold;
InBlock.gif            
this._textColor=color;
InBlock.gif            
this._markX=markX;
InBlock.gif            
this._markY=MarkY;
InBlock.gif            
this.Mark();
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockStart.gifContractedSubBlock.gif        
/**//// <summary>
InBlock.gif        
/// 实例化一个只添加图片水印得实例
InBlock.gif        
/// </summary>
InBlock.gif        
/// <param name="imagePath">水印图片路径</param>
InBlock.gif        
/// <param name="tranparence">透明度</param>
InBlock.gif        
/// <param name="markX">标记位置横坐标</param>
ExpandedSubBlockEnd.gif        
/// <param name="markY">标记位置纵坐标</param>

InBlock.gif        public WaterMark(string imagePath,float tranparence,int markX,int markY)
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
InBlock.gif            
this._markType=MarkType.Image;        
InBlock.gif            
this._imgPath=imagePath;
InBlock.gif            
this._markX=markX;
InBlock.gif            
this._markY=MarkY;
InBlock.gif            
this._transparency=tranparence;
InBlock.gif            
this.Mark();
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockEnd.gif        
#endregion

InBlock.gif
ContractedSubBlock.gifExpandedSubBlockStart.gif        
---------------------公共属性---------------------#region ---------------------公共属性---------------------
ExpandedSubBlockStart.gifContractedSubBlock.gif        
/**//// <summary>
InBlock.gif        
/// 水印类型
ExpandedSubBlockEnd.gif        
/// </summary>

InBlock.gif        public MarkType WaterMarkType
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
InBlock.gif            
get
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                
return _markType;
ExpandedSubBlockEnd.gif            }

InBlock.gif            
set
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                _markType
=value;
ExpandedSubBlockEnd.gif            }

ExpandedSubBlockEnd.gif        }
        
ExpandedSubBlockStart.gifContractedSubBlock.gif        
/**//// <summary>
InBlock.gif        
/// 文字水印得内容
ExpandedSubBlockEnd.gif        
/// </summary>

InBlock.gif        public string Text
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
ExpandedSubBlockStart.gifContractedSubBlock.gif            
getdot.gif{return _text;}
ExpandedSubBlockStart.gifContractedSubBlock.gif            
setdot.gif{_text=value;}
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockStart.gifContractedSubBlock.gif        
/**//// <summary>
InBlock.gif        
/// 水印图片得路径
ExpandedSubBlockEnd.gif        
/// </summary>

InBlock.gif        public string WaterImagePath
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
InBlock.gif            
get
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                
return _imgPath;
ExpandedSubBlockEnd.gif            }

InBlock.gif            
set
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                
this._imgPath=value;
ExpandedSubBlockEnd.gif            }

ExpandedSubBlockEnd.gif        }

ExpandedSubBlockStart.gifContractedSubBlock.gif        
/**//// <summary>
InBlock.gif        
/// 水印图片
ExpandedSubBlockEnd.gif        
/// </summary>

InBlock.gif        public Image WaterImage
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
InBlock.gif            
get
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                
try
ExpandedSubBlockStart.gifContractedSubBlock.gif                
dot.gif{
InBlock.gif                    
return Image.FromFile(this.WaterImagePath);
ExpandedSubBlockEnd.gif                }

InBlock.gif                
catch
ExpandedSubBlockStart.gifContractedSubBlock.gif                
dot.gif{
InBlock.gif                    
return null;
ExpandedSubBlockEnd.gif                }

ExpandedSubBlockEnd.gif                }
            
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockStart.gifContractedSubBlock.gif        
/**//// <summary>
InBlock.gif        
/// 添加水印位置得横坐标
ExpandedSubBlockEnd.gif        
/// </summary>

InBlock.gif        public int MarkX
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
ExpandedSubBlockStart.gifContractedSubBlock.gif            
getdot.gif{return _markX;}
ExpandedSubBlockStart.gifContractedSubBlock.gif            
setdot.gif{_markX=value;}
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockStart.gifContractedSubBlock.gif        
/**//// <summary>
InBlock.gif        
/// 添加水印位置得纵坐标
ExpandedSubBlockEnd.gif        
/// </summary>

InBlock.gif        public int MarkY
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
ExpandedSubBlockStart.gifContractedSubBlock.gif            
getdot.gif{return _markY;}
ExpandedSubBlockStart.gifContractedSubBlock.gif            
setdot.gif{_markY=value;}
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockStart.gifContractedSubBlock.gif        
/**//// <summary>
InBlock.gif        
/// 水印得透明度
ExpandedSubBlockEnd.gif        
/// </summary>

InBlock.gif        public float Transparency
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
InBlock.gif            
get
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                
if(_transparency>1.0f)
ExpandedSubBlockStart.gifContractedSubBlock.gif                
dot.gif{
InBlock.gif                    _transparency
=1.0f;
ExpandedSubBlockEnd.gif                }

ExpandedSubBlockEnd.gif                
return _transparency;}

ExpandedSubBlockStart.gifContractedSubBlock.gif            
setdot.gif{_transparency=value;}
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockStart.gifContractedSubBlock.gif        
/**//// <summary>
InBlock.gif        
/// 水印文字得颜色
ExpandedSubBlockEnd.gif        
/// </summary>

InBlock.gif        public Color TextColor
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
ExpandedSubBlockStart.gifContractedSubBlock.gif            
getdot.gif{return _textColor;}
ExpandedSubBlockStart.gifContractedSubBlock.gif            
setdot.gif{_textColor=value;}
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockStart.gifContractedSubBlock.gif        
/**//// <summary>
InBlock.gif        
/// 水印文字得字体
ExpandedSubBlockEnd.gif        
/// </summary>

InBlock.gif        public string TextFontFamilyStr
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
ExpandedSubBlockStart.gifContractedSubBlock.gif            
getdot.gif{return _fontFamily;}
ExpandedSubBlockStart.gifContractedSubBlock.gif            
setdot.gif{_fontFamily=value;}
ExpandedSubBlockEnd.gif        }

InBlock.gif        
public FontFamily TextFontFamily
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
ExpandedSubBlockStart.gifContractedSubBlock.gif            
getdot.gif{return new FontFamily(this.TextFontFamilyStr);}
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockStart.gifContractedSubBlock.gif        
/**//// <summary>
InBlock.gif        
/// 水印文字是否加粗
ExpandedSubBlockEnd.gif        
/// </summary>

InBlock.gif        public bool Bold
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
ExpandedSubBlockStart.gifContractedSubBlock.gif            
getdot.gif{return _textbold;}
ExpandedSubBlockStart.gifContractedSubBlock.gif            
setdot.gif{_textbold=value;}
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockStart.gifContractedSubBlock.gif        
/**//// <summary>
InBlock.gif        
/// 原图
ExpandedSubBlockEnd.gif        
/// </summary>

InBlock.gif      public Image SourceImage
ExpandedSubBlockStart.gifContractedSubBlock.gif      
dot.gif{
InBlock.gif          
get
ExpandedSubBlockStart.gifContractedSubBlock.gif          
dot.gif{
InBlock.gif              
return _image;
ExpandedSubBlockEnd.gif          }

InBlock.gif          
set
ExpandedSubBlockStart.gifContractedSubBlock.gif          
dot.gif{
InBlock.gif              _image
=value;
ExpandedSubBlockEnd.gif          }

ExpandedSubBlockEnd.gif      }

ExpandedSubBlockStart.gifContractedSubBlock.gif        
/**//// <summary>
InBlock.gif        
/// 加过水印之后得图
ExpandedSubBlockEnd.gif        
/// </summary>

InBlock.gif        public Image MarkedImage
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
InBlock.gif            
get
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                
return this._markedIamge;
ExpandedSubBlockEnd.gif            }
            
ExpandedSubBlockEnd.gif        }

InBlock.gif
ExpandedSubBlockEnd.gif        
#endregion

InBlock.gif
ContractedSubBlock.gifExpandedSubBlockStart.gif        
---------------------方法事件---------------------#region ---------------------方法事件---------------------
InBlock.gif        
public Image Mark(Image img,MarkType markType,string text,Image waterImg,int markx,int marky,
InBlock.gif            
bool bold,Color textColor,float transparence,FontFamily fontFamily)
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
InBlock.gif            
//首先先判断该图片是否是 gif动画,如果为gif动画不对图片进行改动
InBlock.gif
        
InBlock.gif            
foreach(Guid guid in img.FrameDimensionsList)
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                FrameDimension dimension
= new FrameDimension(guid);
InBlock.gif                
if(img.GetFrameCount(dimension)>1)
ExpandedSubBlockStart.gifContractedSubBlock.gif                
dot.gif{
InBlock.gif                    
return img;
ExpandedSubBlockEnd.gif                }

ExpandedSubBlockEnd.gif            }

InBlock.gif            
try
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                
//添加文字水印
InBlock.gif
                if(markType==MarkType.Text)
ExpandedSubBlockStart.gifContractedSubBlock.gif                
dot.gif{
InBlock.gif                    
//根据源图片生成新的Bitmap对象作为作图区,为了给gif图片添加水印,才有此周折
InBlock.gif
                    Bitmap newBitmap=new Bitmap(img.Width,img.Height,PixelFormat.Format24bppRgb); 
InBlock.gif                    
//设置新建位图得分辨率
InBlock.gif
                    newBitmap.SetResolution(img.HorizontalResolution,img.VerticalResolution);
InBlock.gif                    
//创建Graphics对象,以对该位图进行操作
InBlock.gif
                    Graphics g = Graphics.FromImage(newBitmap);
InBlock.gif                    
//消除锯齿
InBlock.gif
                    g.SmoothingMode=SmoothingMode.AntiAlias;
InBlock.gif                    
//将原图拷贝到作图区
InBlock.gif
                    g.DrawImage(img,new Rectangle(0,0,img.Width,img.Height),0,0,img.Width,img.Height,GraphicsUnit.Pixel);
InBlock.gif                    
//声明字体对象
InBlock.gif
                    Font cFont = null;
InBlock.gif                    
//用来测试水印文本长度得尺子
InBlock.gif
                    SizeF size=new SizeF();
InBlock.gif                    
//探测出一个适合图片大小得字体大小,以适应水印文字大小得自适应
InBlock.gif
                    for(int i=0;i<6;i++)
ExpandedSubBlockStart.gifContractedSubBlock.gif                    
dot.gif{
InBlock.gif                        
//创建一个字体对象
InBlock.gif
                        cFont= new Font(fontFamily,sizes[i]);
InBlock.gif                        
//是否加粗
InBlock.gif
                        if(!bold)
ExpandedSubBlockStart.gifContractedSubBlock.gif                        
dot.gif{
InBlock.gif                            cFont
= new Font(fontFamily,sizes[i],FontStyle.Regular);
ExpandedSubBlockEnd.gif                        }

InBlock.gif                        
else
ExpandedSubBlockStart.gifContractedSubBlock.gif                        
dot.gif{
InBlock.gif                            cFont
=new Font(fontFamily,sizes[i],FontStyle.Bold);
ExpandedSubBlockEnd.gif                        }

InBlock.gif                        
//测量文本大小
InBlock.gif
                        size=g.MeasureString(this.Text,cFont);
InBlock.gif                        
//匹配第一个符合要求得字体大小
InBlock.gif
                        if((ushort)size.Width<(ushort)img.Width)
ExpandedSubBlockStart.gifContractedSubBlock.gif                        
dot.gif{
InBlock.gif                            
break;
ExpandedSubBlockEnd.gif                        }

ExpandedSubBlockEnd.gif                    }

InBlock.gif                    
//创建刷子对象,准备给图片写上文字
InBlock.gif
                    Brush brush= new SolidBrush(textColor);
InBlock.gif                    
//在指定得位置写上文字
InBlock.gif
                    g.DrawString(text,cFont,brush,markx,marky);
InBlock.gif                    
//释放Graphics对象
InBlock.gif
                    g.Dispose();   
InBlock.gif                    
//将生成得图片读入MemoryStream
InBlock.gif
                    System.IO.MemoryStream ms = new System.IO.MemoryStream();
InBlock.gif                    newBitmap.Save(ms,ImageFormat.Jpeg);
InBlock.gif                    
//重新生成Image对象
InBlock.gif
                    img=System.Drawing.Image.FromStream(ms);    
InBlock.gif                    
//返回新的Image对象
InBlock.gif
                    return img;
InBlock.gif
ExpandedSubBlockEnd.gif                }

InBlock.gif                
//添加图像水印
InBlock.gif
                else if(markType==MarkType.Image)
ExpandedSubBlockStart.gifContractedSubBlock.gif                
dot.gif{
InBlock.gif                    
//获得水印图像
InBlock.gif
                    Image markImg = waterImg;
InBlock.gif                    
//创建颜色矩阵
ExpandedSubBlockStart.gifContractedSubBlock.gif
                    float[][] ptsArray =dot.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif                                            
new float[] dot.gif{10000},
ExpandedSubBlockStart.gifContractedSubBlock.gif                                            
new float[] dot.gif{01000},
ExpandedSubBlockStart.gifContractedSubBlock.gif                                            
new float[] dot.gif{00100},
ExpandedSubBlockStart.gifContractedSubBlock.gif                                            
new float[] dot.gif{000, transparence, 0}//注意:此处为0.0f为完全透明,1.0f为完全不透明
ExpandedSubBlockStart.gifContractedSubBlock.gif
                                            new float[] dot.gif{00001}}

InBlock.gif                    ColorMatrix colorMatrix
= new ColorMatrix(ptsArray);
InBlock.gif                    
//新建一个Image属性
InBlock.gif
                    ImageAttributes imageAttributes= new ImageAttributes();
InBlock.gif                    
//将颜色矩阵添加到属性
InBlock.gif
                    imageAttributes.SetColorMatrix(colorMatrix,ColorMatrixFlag.Default,
InBlock.gif                        ColorAdjustType.Default);
InBlock.gif                    
//生成位图作图区
InBlock.gif
                    Bitmap newBitmap=new Bitmap(img.Width,img.Height,PixelFormat.Format24bppRgb);
InBlock.gif                    
//设置分辨率
InBlock.gif
                    newBitmap.SetResolution(img.HorizontalResolution,img.VerticalResolution);
InBlock.gif                    
//创建Graphics
InBlock.gif
                    Graphics g = Graphics.FromImage(newBitmap);
InBlock.gif                    
//消除锯齿
InBlock.gif
                    g.SmoothingMode=SmoothingMode.AntiAlias;
InBlock.gif                    
//拷贝原图到作图区
InBlock.gif
                    g.DrawImage(img,new Rectangle(0,0,img.Width,img.Height),0,0,img.Width,img.Height,GraphicsUnit.Pixel);
InBlock.gif                    
//如果原图过小
InBlock.gif
                    if(markImg.Width>img.Width||markImg.Height>img.Height)
ExpandedSubBlockStart.gifContractedSubBlock.gif                    
dot.gif{
InBlock.gif                        System.Drawing.Image.GetThumbnailImageAbort callb
=null;
InBlock.gif                        
//对水印图片生成缩略图,缩小到原图得1/4
InBlock.gif
                        System.Drawing.Image new_img=markImg.GetThumbnailImage(img.Width/4,markImg.Height*img.Width/markImg.Width,callb,new System.IntPtr());
InBlock.gif                        
//添加水印
InBlock.gif
                        g.DrawImage(new_img,new Rectangle(markx,marky,new_img.Width,new_img.Height),0,0,new_img.Width,new_img.Height,GraphicsUnit.Pixel,imageAttributes);
InBlock.gif                        
//释放缩略图
InBlock.gif
                        new_img.Dispose();
InBlock.gif                        
//释放Graphics
InBlock.gif
                        g.Dispose();
InBlock.gif                        
//将生成得图片读入MemoryStream
InBlock.gif
                        System.IO.MemoryStream ms = new System.IO.MemoryStream();
InBlock.gif                        newBitmap.Save(ms,ImageFormat.Jpeg);
InBlock.gif          
//返回新的Image对象
InBlock.gif
                        img=Image.FromStream(ms);
InBlock.gif                        
return img;
ExpandedSubBlockEnd.gif                    }

InBlock.gif                        
//原图足够大
InBlock.gif
                    else
ExpandedSubBlockStart.gifContractedSubBlock.gif                    
dot.gif{
InBlock.gif                        
//添加水印
InBlock.gif
                        g.DrawImage(markImg,new Rectangle(markx,marky,markImg.Width,markImg.Height),0,0,markImg.Width,markImg.Height,GraphicsUnit.Pixel,imageAttributes);
InBlock.gif                        
//释放Graphics
InBlock.gif
                        g.Dispose();
InBlock.gif                        
//将生成得图片读入MemoryStream
InBlock.gif
                        System.IO.MemoryStream ms = new System.IO.MemoryStream();
InBlock.gif                        newBitmap.Save(ms,ImageFormat.Jpeg);
InBlock.gif                        
//返回新的Image对象
InBlock.gif
                        img=Image.FromStream(ms);
InBlock.gif                        
return img;
ExpandedSubBlockEnd.gif                    }
                    
ExpandedSubBlockEnd.gif                }

InBlock.gif                
return img;
ExpandedSubBlockEnd.gif            }

InBlock.gif            
catch
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                
return img;   
ExpandedSubBlockEnd.gif            }
            
InBlock.gif
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockStart.gifContractedSubBlock.gif        
/**//// <summary>
InBlock.gif        
/// 添加水印,此方法适用于gif格式得图片
InBlock.gif        
/// </summary>
InBlock.gif        
/// <param name="image">需要添加水印得图片</param>
ExpandedSubBlockEnd.gif        
/// <returns>添加水印之后得图片</returns>

InBlock.gif        private void Mark()
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
InBlock.gif            
this._markedIamge=Mark(this.SourceImage,this.WaterMarkType,this._text,this.WaterImage,this._markX,this._markY,this._textbold,this._textColor,this._transparency,this.TextFontFamily);
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockEnd.gif        
#endregion
        
ExpandedSubBlockEnd.gif    }

ExpandedBlockEnd.gif}

None.gif

利用该类,您可以轻松的对图片加水印,但也有不足,通过这种方法添加水印,会破坏.gif动画,因为我目前还不知道如何判断.gif文件是否是动画,这个问题还需要各位网友的建议和帮助

转载于:https://www.cnblogs.com/jillzhang/archive/2005/12/20/300593.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值