Detecting clipping paths in JPG

Jul 15, 2015 at 8:56 AM
I need to check if a JPG image has a clipping path or not. I have used the Interop.ImageMagick.dll earlier and then we used something like this:
MagickImage img = new MagickImage();

IList<object> parameters = new List<object>();

string clipPathInfo = img.Identify(parameters.ToArray()).ToString();
Is there a way to do this in in Magick.NET?
Jul 15, 2015 at 9:09 AM
Edited Jul 15, 2015 at 9:34 AM
Are you sure that you are using Magick.NET? There is no Identify method in the MagickImage class.

EDIT: Sorry, I did not see you posted the Interop syntax. You can do it like this:
using (MagickImage image = new MagickImage(sourceFilePath))
  string clipPathInfo = image.GetAttribute("8BIM:1999,2998:#1");
But I think this deserves a special property. I will add a new property called HasClippingPath in the next release.
Jul 15, 2015 at 9:35 AM
Edited Jul 15, 2015 at 9:36 AM
Thank you, that sounds great :)
Jul 15, 2015 at 9:35 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.