This project has moved and is read-only. For the latest updates, please go here.

Resize filter parameters

Aug 2, 2013 at 9:14 AM
Hi Magick.Net
Filter Function group to use it for image resize was not found.
I hope for the addition of the functions. thanks.

example,
http://www.dylanbeattie.net/magick/filters/result.html

MagickSetImageArtifact(wand, "filter:lobes", 4)
MagickSetImageArtifact(wand, "filter:window", FilterTypes.Sinc);
MagickResizeImage(wand, 1280, 800, FilterTypes FilterTypes.LanczosFilter, (double) 1.1);

convert in.png -resize "1280x800" -filter Lanczos -blur 1.1 -define filter:window=Sinc -define filter:lobes=4 out.png
Aug 3, 2013 at 9:24 AM
You will be able to set the filter options when the following work item has been completed: https://magick.codeplex.com/workitem/1027. I will add a method called 'SetArtifact' to MagickImage.
Aug 3, 2013 at 2:21 PM
Cheers, Thanks for your time.
Aug 13, 2013 at 11:06 AM
//  Magick.NET 6.8.6.801  .Net 4.0
void result(object z){ System.Diagnostics.Debug.WriteLine(String.Format("{0}", z ?? "null")); }

using (MagickImage img = new MagickImage(src))
{
String z;
z = "filename";             result(img.GetAttribute(z));
img.SetAttribute(z,"test"); result(img.GetAttribute(z));

z="filter:blur";            result(img.GetArtifact(z)); 
img.SetArtifact(z, "1.23"); result(img.GetArtifact(z)); 
}

result:
null
test
null
null
I tested it, but GetArtifact function() Result appearing not as expected.
What is a problem? ,thanks
Aug 13, 2013 at 12:15 PM
Thank you for finding that bug. The artifact is set but GetArtifact now returns the attribute instead of the artifact.
Aug 29, 2013 at 6:35 PM
Magick.NET/Enums/FilterType.h

Lanczos2Sharo = MagickCore::Lanczos2SharpFilter,

typo?

Lanczos2Sharp = MagickCore::Lanczos2SharpFilter,
Aug 31, 2013 at 8:53 PM
Thank you for finding this. It will be fixed in the next release of Magick.NET.