サムネイルの生成(歪みなし)
1254 ワード
#region
///
///
///
///
///
///
public static bool makeListImage(string imgPath, string savePaty)
{
try
{
System.Drawing.Image img = System.Drawing.Image.FromFile(imgPath);
Graphics g = Graphics.FromImage(img);
Font font = new Font(" ", 14);
Brush brush = Brushes.Black;
g.DrawString("100wx.com", font, brush, 3, 3);
//
System.Drawing.Image.GetThumbnailImageAbort callback = new System.Drawing.Image.GetThumbnailImageAbort(gett);
//
img = img.GetThumbnailImage(45, 45, callback, new IntPtr());
img.Save(savePaty, System.Drawing.Imaging.ImageFormat.Jpeg);
g.Dispose();
img.Dispose();
//PPD1aGlm
}
catch { return false; }
return true;
}
public static bool gett()
{
return true;
}
#endregion