mirror of
https://github.com/greenshot/greenshot
synced 2025-07-15 01:23:47 -07:00
Fixing some bitmap code to work, this should improve the quality a bit. Also re-factored some code so I could add more professionally shadows.
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1639 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
a52e83dc45
commit
ab7522d743
7 changed files with 360 additions and 253 deletions
|
@ -26,6 +26,7 @@ using System.Net;
|
|||
using System.Text;
|
||||
|
||||
using Greenshot.Plugin;
|
||||
using GreenshotPlugin.Core;
|
||||
|
||||
namespace GreenshotNetworkImportPlugin {
|
||||
public class HTTPReceiver {
|
||||
|
@ -127,10 +128,11 @@ namespace GreenshotNetworkImportPlugin {
|
|||
using (MemoryStream memoryStream = new MemoryStream(imageBytes, 0, imageBytes.Length)) {
|
||||
// Convert byte[] to Image
|
||||
memoryStream.Write(imageBytes, 0, imageBytes.Length);
|
||||
Image image = Image.FromStream(memoryStream, true);
|
||||
ICapture capture = host.GetCapture(image);
|
||||
capture.CaptureDetails.Title = title;
|
||||
host.ImportCapture(capture);
|
||||
using (Image image = Bitmap.FromStream(memoryStream, true)) {
|
||||
ICapture capture = host.GetCapture(ImageHelper.CloneImageToBitmap(image));
|
||||
capture.CaptureDetails.Title = title;
|
||||
host.ImportCapture(capture);
|
||||
}
|
||||
response.StatusCode = (int)HttpStatusCode.OK;
|
||||
byte[] content = Encoding.UTF8.GetBytes("Greenshot-OK");
|
||||
response.ContentType = "text";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue