BUG-2056: A better fix for the issue, there was already something build in. [skip ci]

This commit is contained in:
Robin 2017-01-16 17:06:50 +01:00
commit 89ae9489d2
4 changed files with 17 additions and 13 deletions

View file

@ -105,7 +105,7 @@ namespace GreenshotPlugin.Core {
bool useMemoryStream = false;
MemoryStream memoryStream = null;
if (outputSettings.Format == OutputFormat.greenshot && surface == null) {
throw new ArgumentException("Surface needs to be se when using OutputFormat.Greenshot");
throw new ArgumentException("Surface needs to be set when using OutputFormat.Greenshot");
}
try {

View file

@ -98,8 +98,15 @@ namespace Greenshot.Plugin {
ReduceColors = reduceColors;
}
public SurfaceOutputSettings PreventGreenshotFormat() {
if (Format == OutputFormat.greenshot) {
/// <summary>
/// BUG-2056 reported a logical issue, using greenshot format as the default causes issues with the external commands.
/// </summary>
/// <returns>this for fluent API usage</returns>
public SurfaceOutputSettings PreventGreenshotFormat()
{
// If OutputFormat is Greenshot, use PNG instead.
if (Format == OutputFormat.greenshot)
{
Format = OutputFormat.png;
}
return this;