mirror of
https://github.com/greenshot/greenshot
synced 2025-08-20 21:43:24 -07:00
Moving back to trunk!
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1602 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
ad265b2c54
commit
8d458998a1
332 changed files with 17647 additions and 9466 deletions
|
@ -27,8 +27,8 @@ using System.Net;
|
|||
using System.Text;
|
||||
using System.Web;
|
||||
|
||||
using GreenshotPlugin.Controls;
|
||||
using GreenshotPlugin.Core;
|
||||
using IniFile;
|
||||
|
||||
namespace GreenshotImgurPlugin {
|
||||
/// <summary>
|
||||
|
@ -127,20 +127,6 @@ namespace GreenshotImgurPlugin {
|
|||
return imgurInfo;
|
||||
}
|
||||
|
||||
public static Image CreateThumbnail(Image image, int thumbWidth, int thumbHeight) {
|
||||
int srcWidth=image.Width;
|
||||
int srcHeight=image.Height;
|
||||
Bitmap bmp = new Bitmap(thumbWidth, thumbHeight);
|
||||
using (Graphics gr = System.Drawing.Graphics.FromImage(bmp)) {
|
||||
gr.SmoothingMode = SmoothingMode.HighQuality ;
|
||||
gr.CompositingQuality = CompositingQuality.HighQuality;
|
||||
gr.InterpolationMode = InterpolationMode.High;
|
||||
System.Drawing.Rectangle rectDestination = new System.Drawing.Rectangle(0, 0, thumbWidth, thumbHeight);
|
||||
gr.DrawImage(image, rectDestination, 0, 0, srcWidth, srcHeight, GraphicsUnit.Pixel);
|
||||
}
|
||||
return bmp;
|
||||
}
|
||||
|
||||
public static void RetrieveImgurThumbnail(ImgurInfo imgurInfo) {
|
||||
LOG.InfoFormat("Retrieving Imgur image for {0} with url {1}", imgurInfo.Hash, imgurInfo);
|
||||
HttpWebRequest webRequest = (HttpWebRequest)NetworkHelper.CreatedWebRequest(imgurInfo.SmallSquare);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue