From 7573373a5df2eb823b8b6ebab98a3da76fb6ff80 Mon Sep 17 00:00:00 2001 From: RKrom Date: Thu, 7 Feb 2013 09:31:15 +0000 Subject: [PATCH] Moved check for OutputPrintInverted & the conversion from the PrintHelper to the PrinterDestination, this way it's all on one location. git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2468 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4 --- Greenshot/Destinations/PrinterDestination.cs | 5 +++++ Greenshot/Helpers/PrintHelper.cs | 8 +------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Greenshot/Destinations/PrinterDestination.cs b/Greenshot/Destinations/PrinterDestination.cs index bf4a394c0..663273015 100644 --- a/Greenshot/Destinations/PrinterDestination.cs +++ b/Greenshot/Destinations/PrinterDestination.cs @@ -118,6 +118,11 @@ namespace Greenshot.Destinations { // Set the color reducing if needed, this should change the 24/32-> 8 (or later even 1) bpp // printOutputSettings.ReduceColors = true; + // Moved this from the PrintHelper, the invert effect should probably be the last! + if (conf.OutputPrintInverted) { + printOutputSettings.Effects.Add(new InvertEffect()); + } + Image imageToPrint; Boolean disposeImage = ImageOutput.CreateImageFromSurface(surface, printOutputSettings, out imageToPrint); try { diff --git a/Greenshot/Helpers/PrintHelper.cs b/Greenshot/Helpers/PrintHelper.cs index 89e583d4b..bf805ec30 100644 --- a/Greenshot/Helpers/PrintHelper.cs +++ b/Greenshot/Helpers/PrintHelper.cs @@ -213,13 +213,7 @@ namespace Greenshot.Helpers { e.Graphics.DrawString(footerString, f, Brushes.Black, pageRect.Width / 2 - (footerStringWidth / 2), pageRect.Height); } } - if (conf.OutputPrintInverted) { - using (Bitmap negativeBitmap = ImageHelper.CreateNegative((Bitmap)image)) { - e.Graphics.DrawImage(negativeBitmap, printRect, imageRect, GraphicsUnit.Pixel); - } - } else { - e.Graphics.DrawImage(image, printRect, imageRect, GraphicsUnit.Pixel); - } + e.Graphics.DrawImage(image, printRect, imageRect, GraphicsUnit.Pixel); } } }