mirror of
https://github.com/greenshot/greenshot
synced 2025-08-20 05:23:24 -07:00
Applied my "patch" which refactors the complete codebase to have IEffect support, this is an interface which can be used to supply effects to a bitmap. These effects can now be passed to the OutputSettings (which now is called SurfaceOutputSettings) to control how the output is modified. This is very useful for e.g. OCR which needs a grayscale & resized image.
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2377 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
5541e2e1c7
commit
0c7e16a771
33 changed files with 212 additions and 148 deletions
|
@ -388,7 +388,7 @@ EndSelection:<<<<<<<4
|
|||
if (config.ClipboardFormats.Contains(ClipboardFormat.PNG) || config.ClipboardFormats.Contains(ClipboardFormat.HTMLDATAURL)) {
|
||||
pngStream = new MemoryStream();
|
||||
// PNG works for Powerpoint
|
||||
OutputSettings pngOutputSettings = new OutputSettings(OutputFormat.png, 100, false);
|
||||
SurfaceOutputSettings pngOutputSettings = new SurfaceOutputSettings(OutputFormat.png, 100, false);
|
||||
ImageOutput.SaveToStream(surface, pngStream, pngOutputSettings);
|
||||
pngStream.Seek(0, SeekOrigin.Begin);
|
||||
}
|
||||
|
@ -401,7 +401,7 @@ EndSelection:<<<<<<<4
|
|||
if (config.ClipboardFormats.Contains(ClipboardFormat.DIB)) {
|
||||
bmpStream = new MemoryStream();
|
||||
// Save image as BMP
|
||||
OutputSettings bmpOutputSettings = new OutputSettings(OutputFormat.bmp, 100, false);
|
||||
SurfaceOutputSettings bmpOutputSettings = new SurfaceOutputSettings(OutputFormat.bmp, 100, false);
|
||||
ImageOutput.SaveToStream(surface, bmpStream, bmpOutputSettings);
|
||||
|
||||
imageStream = new MemoryStream();
|
||||
|
@ -414,7 +414,7 @@ EndSelection:<<<<<<<4
|
|||
|
||||
// Set the HTML
|
||||
if (config.ClipboardFormats.Contains(ClipboardFormat.HTML)) {
|
||||
string tmpFile = ImageOutput.SaveToTmpFile(surface, new OutputSettings(OutputFormat.png), null);
|
||||
string tmpFile = ImageOutput.SaveToTmpFile(surface, new SurfaceOutputSettings(OutputFormat.png), null);
|
||||
string html = getHTMLString(surface, tmpFile);
|
||||
ido.SetText(html, TextDataFormat.Html);
|
||||
} else if (config.ClipboardFormats.Contains(ClipboardFormat.HTMLDATAURL)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue