mirror of
https://github.com/greenshot/greenshot
synced 2025-07-16 10:03:44 -07:00
FEATURE-838: Added support for dragging an image from google image search results directly into the editor.
This commit is contained in:
parent
ea8c27449f
commit
5d8ad4d021
2 changed files with 53 additions and 7 deletions
|
@ -148,5 +148,19 @@ namespace GreenshotPlugin.Core {
|
|||
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Read "streamextensions" :)
|
||||
/// </summary>
|
||||
/// <param name="input">Stream</param>
|
||||
/// <param name="output">Stream</param>
|
||||
public static void CopyTo(this Stream input, Stream output) {
|
||||
byte[] buffer = new byte[16 * 1024]; // Fairly arbitrary size
|
||||
int bytesRead;
|
||||
|
||||
while ((bytesRead = input.Read(buffer, 0, buffer.Length)) > 0) {
|
||||
output.Write(buffer, 0, bytesRead);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue