Hi
I am writing small VB.NET application that delete almost white jpeg images in a folder.
The images are generated by a scanner.
For IM I found that the command line commando could be like this:
convert image1.jpg -format "%[fx:mean>0.99?1:0]"
As this is my first project with Magick.NET, I would be very grateful to anyone who can give me a hint on how to do that with Magick.NET in vb.net or C #
Thanks
find almost completely white pictures
-
- Posts: 2
- Joined: 2018-01-13T01:57:23-07:00
- Authentication code: 1152
Re: find almost completely white pictures
You can use the `FormatExpression` method for this in Magick.NET:
Code: Select all
using (var image = new MagickImage("image1.jpg"))
{
var mean = image.FormatExpression("%[fx:mean>0.99?1:0]");
if (mean == "1")
{
// Do something...
}
}
-
- Posts: 2
- Joined: 2018-01-13T01:57:23-07:00
- Authentication code: 1152
Re: find almost completely white pictures
Thanks it works perfekt