Added auto reduction test as a property, so we can turn it off if the results are contra productive. Updated the readme.txt

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1714 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-03-20 17:04:41 +00:00
commit d3246b4368
3 changed files with 20 additions and 14 deletions

View file

@ -100,7 +100,8 @@ namespace Greenshot.Helpers {
break;
}
// If Quantizing is enable, overwrite the image to save with a 256 - color version
// check for color reduction, forced or automatically
if (conf.OutputFileAutoReduceColors || reduceColors) {
IColorQuantizer quantizer = ImageHelper.PrepareQuantize((Bitmap)imageToSave);
int colorCount = quantizer.GetColorCount();
LOG.InfoFormat("Image with format {0} has {1} colors", imageToSave.PixelFormat, colorCount);
@ -114,6 +115,9 @@ namespace Greenshot.Helpers {
LOG.Warn("Error occurred while Quantizing the image, ignoring and using original. Error: ", e);
}
}
} else {
LOG.Info("Skipping color reduction test, OutputFileAutoReduceColors is set to false.");
}
try {
// Create meta-data

View file

@ -3,7 +3,7 @@ Greenshot: A screenshot tool optimized for productivity. Save a screenshot or a
CHANGE LOG:
0.9.0 Build 1667
0.9.0 Build 1714
We changed the version to 0.9.0 as the amount of features in 0.8.1 was more than planned.
@ -25,7 +25,7 @@ Features added:
* Added Ctrl/shift logic to the editor, hard to explain (see help) but hold one of the keys down and draw..
* Added a color picker in the color dialog.
* Added shadow & torn edges
* Added color reduction as an option and auto detection for image with less than 256 color. When using reduction this results in smaller files.
0.8.1 Build 1483

View file

@ -92,6 +92,8 @@ namespace GreenshotPlugin.Core {
public OutputFormat OutputFileFormat = OutputFormat.png;
[IniProperty("OutputFileReduceColors", Description="If set to true, than the colors of the output file are reduced to 256 (8-bit) colors", DefaultValue="false")]
public bool OutputFileReduceColors;
[IniProperty("OutputFileAutoReduceColors", Description = "If set to true the amount of colors is counted and if smaller than 256 the color reduction is automatically used.", DefaultValue = "true")]
public bool OutputFileAutoReduceColors;
[IniProperty("OutlookEmailFormat", Description = "Default type for emails. (Text, HTML)", DefaultValue="HTML")]
public EmailFormat OutlookEmailFormat;