Fix for Bug #3468436, when writing GIF force quantizing as the default .NET dithering is very bad.

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1715 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-03-21 05:34:22 +00:00
commit 992e6e583f

View file

@ -100,6 +100,11 @@ namespace Greenshot.Helpers {
break; break;
} }
// Fix for Bug #3468436, force quantizing when output format is gif as this has only 256 colors!
if (ImageFormat.Gif.Equals(imageFormat)) {
reduceColors = true;
}
// check for color reduction, forced or automatically // check for color reduction, forced or automatically
if (conf.OutputFileAutoReduceColors || reduceColors) { if (conf.OutputFileAutoReduceColors || reduceColors) {
IColorQuantizer quantizer = ImageHelper.PrepareQuantize((Bitmap)imageToSave); IColorQuantizer quantizer = ImageHelper.PrepareQuantize((Bitmap)imageToSave);