public void formatImage()
{
//格式化後的圖片大小
int _WIDTH =
int _HEIGHT =
System
System
//制作縮略圖
int width = img
int height = img
double divide = (double)height / (double)width;
if (width > _WIDTH || height > _HEIGHT)
{
if (width > _WIDTH)
{
height = Convert
width = _WIDTH;
}
if (height > _HEIGHT)
{
width = Convert
height = _HEIGHT;
}
System
timg
//下面的是保存到流中
//MemoryStream ms = new MemoryStream();
//timg
//ms
}
}
public bool ThumbnailCallback()
{
return false;
}
From:http://tw.wingwit.com/Article/program/net/201311/13712.html