c#给图片添加文字
2012-11-16 20:54:13 来源:WEB开发网核心提示:}else{if (image.Height / tHeight >= image.Width / tWidth){bl = Convert.ToDouble(image.Height) / Convert.ToDouble(tHeight);}else{bl = Convert.ToDouble(image.W
}
else
{
if (image.Height / tHeight >= image.Width / tWidth)
{
bl = Convert.ToDouble(image.Height) / Convert.ToDouble(tHeight);
else
{
if (image.Height / tHeight >= image.Width / tWidth)
{
bl = Convert.ToDouble(image.Height) / Convert.ToDouble(tHeight);
}
else
{
bl = Convert.ToDouble(image.Width) / Convert.ToDouble(tWidth);
}
}
Bitmap b = new Bitmap(image, Convert.ToInt32(image.Width / bl), Convert.ToInt32(image.Height / bl));
b.Save(newpath);
b.Dispose();
image.Dispose();
}
catch
{
}
}
}
}
更多精彩
赞助商链接