mirror of
https://github.com/greenshot/greenshot
synced 2025-08-19 21:13:23 -07:00
cleanup & small fixes. Added some more IBinaryContainer implementations which are used by plugins which aren't rolled out yet. (but I didn't want to loose the code)
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2524 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
623fa983c3
commit
b7b89ade04
7 changed files with 167 additions and 38 deletions
|
@ -91,13 +91,16 @@ namespace GreenshotPlugin.Core {
|
|||
/// the stream is checked if it's seekable and if needed a MemoryStream as "cache" is used.
|
||||
/// </summary>
|
||||
/// <param name="imageToSave">image to save</param>
|
||||
/// <param name="surface">surface for the elements, if the greenshot format is used</param>
|
||||
/// <param name="surface">surface for the elements, needed if the greenshot format is used</param>
|
||||
/// <param name="stream">Stream to save to</param>
|
||||
/// <param name="outputSettings">SurfaceOutputSettings</param>
|
||||
public static void SaveToStream(Image imageToSave, ISurface surface, Stream stream, SurfaceOutputSettings outputSettings) {
|
||||
ImageFormat imageFormat = null;
|
||||
bool useMemoryStream = false;
|
||||
MemoryStream memoryStream = null;
|
||||
if (outputSettings.Format == OutputFormat.greenshot && surface == null) {
|
||||
throw new ArgumentException("Surface needs to be se when using OutputFormat.Greenshot");
|
||||
}
|
||||
|
||||
try {
|
||||
switch (outputSettings.Format) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue