mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
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:
parent
a57fa7086f
commit
cd3c8aeb0b
3 changed files with 37 additions and 15 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue