Fixed bug #3594681, do not use 256-color reducing when using inline dataurl for HTML.

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2388 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-12-17 11:22:29 +00:00
commit cd3c8aeb0b
3 changed files with 37 additions and 15 deletions

View file

@ -78,9 +78,11 @@ namespace Greenshot.Plugin {
public class SurfaceOutputSettings {
private static CoreConfiguration conf = IniConfig.GetIniSection<CoreConfiguration>();
private bool reduceColors;
private bool disableReduceColors;
private List<IEffect> effects = new List<IEffect>();
public SurfaceOutputSettings() {
disableReduceColors = false;
Format = conf.OutputFileFormat;
JPGQuality = conf.OutputFileJpegQuality;
ReduceColors = conf.OutputFileReduceColors;
@ -120,15 +122,30 @@ namespace Greenshot.Plugin {
}
public bool ReduceColors {
get {
// Fix for Bug #3468436, force quantizing when output format is gif as this has only 256 colors!
if (OutputFormat.gif.Equals(Format)) {
return true;
get {
// Fix for Bug #3468436, force quantizing when output format is gif as this has only 256 colors!
if (OutputFormat.gif.Equals(Format)) {
return true;
}
return reduceColors;
}
return reduceColors;
set {
reduceColors = value;
}
}
/// <summary>
/// Disable the reduce colors option, this overrules the enabling
/// </summary>
public bool DisableReduceColors {
get {
return disableReduceColors;
}
set {
reduceColors = value;
// Quantizing os needed when output format is gif as this has only 256 colors!
if (!OutputFormat.gif.Equals(Format)) {
disableReduceColors = value;
}
}
}
}