Page 1 of 1

Check file for instance of clipping path (name) in a pTIFF

Posted: 2015-07-29T15:53:50-07:00
by limey2632
Hi folks,
My question is about the ability of ImageMagick to read the existence of a path name (NORMALPATH) in a pTIFF/TIFF file?
I'm looking for a way for a utility written in C# to be able to check for the existence of a normal path named "path1" in a pTIFF file. Our programming department has provided us (production artists) with a utility that uploads our web images to the servers. We are uploading some files with paths and they have to be flagged in our system in order to be activated in the programming. we currently have to do this on an individual basis.

I am looking for a command line program that would identify the existence of the path or a way to have C# do it directly. Is ImageMagick right for the job? If so I will inform the company's programmers. Does anyone know of this kind of scripting being done? Sorry if this post is out of place but it is code related.

Many thanks,
Paul (Limey)

Re: Check file for instance of clipping path (name) in a pTIFF

Posted: 2015-07-29T15:58:44-07:00
by fmw42
Typically the clip path will be in the identify -verbose yourimage.tif listing to the terminal as well as in the 8bim profile. See http://www.imagemagick.org/Usage/masking/#clip-path

If you have install IM already, see what gets returned from

Code: Select all

identify -format '%[8BIM:1999,2998:#1]' yourimage.tif
or just

Code: Select all

identify -verbose yourimage.tif
Otherwise, if you upload an example image to dropbox.com and put the URL here, some one here can look into it for you.


I have moved this to the Users forum, since I do not think this is related to Magick Scripting Language. It is also relevant to the Magick.Net forum, so dlemstra can move it there if he feels that is more relevant.

Re: Check file for instance of clipping path (name) in a pTIFF

Posted: 2015-07-31T04:44:09-07:00
by dlemstra
At this moment this is not possible with in Magick.NET but you can get the names of the clipping paths with the following code in the next version of Magick.NET (7.0.0.0017)

Code: Select all

using (MagickImage image = new MagickImage("YourFile.tiff"))
{
  EightBimProfile profile = image.Get8BimProfile();
  foreach(ClipPath path in profile.ClipPaths)
  {
    Console.WriteLine(path.Name);
  }
}
I will try to publish a new release this weekend.

Re: Check file for instance of clipping path (name) in a pTIFF

Posted: 2015-07-31T09:40:15-07:00
by limey2632
Thank you Dlemstra, much appreciated!

Paul (Limey)

Re: Check file for instance of clipping path (name) in a pTIFF

Posted: 2015-07-31T10:14:03-07:00
by fmw42
dlemstra wrote:At this moment this is not possible with in Magick.NET but you can get the names of the clipping paths with the following code in the next version of Magick.NET (7.0.0.0017)

Please note that Dirk is referring to IM 7 and not IM 6.