Skip to content
This repository has been archived by the owner on Jul 5, 2021. It is now read-only.

Commit

Permalink
Updated MagickScript.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemstra committed Jun 21, 2015
1 parent 7008d03 commit 63b6ee8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
Binary file modified GraphicsMagick.NET/GlobalSuppressions.cpp
Binary file not shown.
2 changes: 1 addition & 1 deletion GraphicsMagick.NET/Script/Generated/Execute.cpp
Expand Up @@ -1466,7 +1466,7 @@ namespace GraphicsMagick
else if (OnlyContains(arguments, "width", "height", "bias"))
image->AdaptiveThreshold((int)arguments["width"], (int)arguments["height"], (Percentage)arguments["bias"]);
else if (OnlyContains(arguments, "width", "height", "bias"))
image->AdaptiveThreshold((int)arguments["width"], (int)arguments["height"], (Magick::Quantum)arguments["bias"]);
image->AdaptiveThreshold((int)arguments["width"], (int)arguments["height"], (double)arguments["bias"]);
else
throw gcnew ArgumentException("Invalid argument combination for 'adaptiveThreshold', allowed combinations are: [width, height] [width, height, bias] [width, height, bias]");
}
Expand Down
Expand Up @@ -27,6 +27,9 @@ private AnyCPUGenerator()
//===========================================================================================
private void Cleanup()
{
if (!Directory.Exists(OutputFolder))
return;

foreach (string fileName in Directory.GetFiles(OutputFolder, "*.cs", SearchOption.AllDirectories))
{
File.Delete(fileName);
Expand Down
Expand Up @@ -68,10 +68,12 @@ protected static void Close(IndentedTextWriter writer)
//===========================================================================================
protected IndentedTextWriter CreateWriter(string fileName)
{
string outputFile = Path.GetFullPath(OutputFolder + @"\" + fileName);
Console.WriteLine("Creating: " + outputFile);
FileInfo outputFile = new FileInfo(Path.GetFullPath(OutputFolder + @"\" + fileName));
Console.WriteLine("Creating: " + outputFile.FullName);
if (!outputFile.Directory.Exists)
outputFile.Directory.Create();

FileStream output = File.Create(outputFile);
FileStream output = outputFile.Create();
StreamWriter streamWriter = new StreamWriter(output);
IndentedTextWriter writer = new IndentedTextWriter(streamWriter, "\t");
return writer;
Expand Down

0 comments on commit 63b6ee8

Please sign in to comment.