希望大家多多给我提意见哈!
自己感觉来说功能还是比较齐全的。
支持缩略图,是否等比缩放,指定像素缩放,限定上传大小,上传尺寸,图片存放路径,信息导出
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Drawing;
using System.IO;
/// <summary>
/// UploadIMG 的摘要说明
/// </summary>
public class UploadIMG
{
public UploadIMG()
{
//
// TODO: 在此处添加构造函数逻辑
//
}
private string _MSG;
private string _ofullname;
private string _tfullname;
private string _ofilename;
private string _tfilename;
private int _limitwidth = 2048;
private int _limitheight = 1536;
private int _twidth = 100;
private int _theight = 100;
private int _size = 1000000;
private bool _israte = true;
private string _path = "UpdateFile ";
/// <summary>
/// 信息
/// </summary>
public string MSG
{
get { return _MSG; }
set { _MSG = value; }
}
/// <summary>
/// 保存时的完整路径.原图
/// </summary>
public string OFullName
{
get { return _ofullname; }
set { _ofullname = value; }
}
/// <summary>
/// 保存时的完整路径.缩略图
/// </summary>
public string TFullName
{
get { return _tfullname; }
set { _tfullname = value; }
}
/// <summary>
/// 保存时的图片名称.原图
/// </summary>
public string OFileName