mirror of
https://github.com/greenshot/greenshot
synced 2025-07-14 17:13:44 -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
|
@ -24,11 +24,13 @@ using System.IO;
|
|||
using System.Net;
|
||||
using System.Text;
|
||||
|
||||
using IniFile;
|
||||
|
||||
namespace GreenshotPlugin.Core {
|
||||
/// <summary>
|
||||
/// Description of NetworkHelper.
|
||||
/// </summary>
|
||||
public class NetworkHelper {
|
||||
public static class NetworkHelper {
|
||||
private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(NetworkHelper));
|
||||
private static CoreConfiguration config = IniConfig.GetIniSection<CoreConfiguration>();
|
||||
|
||||
|
@ -64,8 +66,9 @@ namespace GreenshotPlugin.Core {
|
|||
HttpWebRequest request = (HttpWebRequest)NetworkHelper.CreatedWebRequest(url);
|
||||
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
|
||||
if (request.HaveResponse) {
|
||||
Image image = Image.FromStream(response.GetResponseStream());
|
||||
return (image.Height > 16 && image.Width > 16) ? new Bitmap(image, 16, 16) : new Bitmap(image);
|
||||
using (Image image = Image.FromStream(response.GetResponseStream())) {
|
||||
return (image.Height > 16 && image.Width > 16) ? new Bitmap(image, 16, 16) : new Bitmap(image);
|
||||
}
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue