which libs for clipping path recognition

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
axelrose
Posts: 96
Joined: 2008-12-16T06:01:27-07:00

which libs for clipping path recognition

Post by axelrose »

Hello all,

I have one installation where "identify -verbose with-clip.jpg" doesn't show any
clipping path whereas another installation shows such a path on the same test image.

The working installation is from MacPorts and uses libexpat and has no librsvg.
The failing installation is using libxml2.

Which libraries are essential to recognize the clipping path?

Thanks, Axel.
axelrose
Posts: 96
Joined: 2008-12-16T06:01:27-07:00

Re: which libs for clipping path recognition

Post by axelrose »

(edit)

Perhaps this is not a library issue.

I debugged further and found that in "property.c"

Code: Select all

  profile=GetImageProfile(image,"8bim");
doesn't return any profile.

Does anybody have an idea why this particular "8bim" profile doesn't seem to be extractable?
After building "make check" doesn't report any error.
How could I continue debugging?

Regards, Axel
axelrose
Posts: 96
Joined: 2008-12-16T06:01:27-07:00

Re: which libs for clipping path recognition

Post by axelrose »

After reading a few other threads in this forum which mention issues with 'iptc' and '8bim'
profiles I retried with an older versions, using the same build script as before.

6.6.3-10 works fine
6.6.6-3 doesn't work

There is no need to have librsvg or xml support.

I suggest the test routines are expanded to reveal this problem earlier.

Regards, Axel.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: which libs for clipping path recognition

Post by magick »

Can you post a URL to with-clip.jpg? We'll need to reproduce the problem and we'll follow up with a patch in the next few days. Thanks.
axelrose
Posts: 96
Joined: 2008-12-16T06:01:27-07:00

Re: which libs for clipping path recognition

Post by axelrose »

http://dl.dropbox.com/u/84530/IM/with-clip.jpg

> ImageMagick-6.6.3-10/bin/identify -verbose with-clip.jpg | grep svg
<svg width="100" height="100">
</svg>

> ImageMagick-6.6.6-3/bin/identify -verbose with-clip.jpg | grep svg
>
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: which libs for clipping path recognition

Post by magick »

Thanks, we'll get a patch in the next point release of ImageMagick.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: which libs for clipping path recognition

Post by anthony »

axelrose wrote:http://dl.dropbox.com/u/84530/IM/with-clip.jpg

> ImageMagick-6.6.3-10/bin/identify -verbose with-clip.jpg | grep svg
<svg width="100" height="100">
</svg>

> ImageMagick-6.6.6-3/bin/identify -verbose with-clip.jpg | grep svg
>
Of course grep will not show any lines between the start and end SVG lines. Thye don't contain the text 'svg'.
Try this..

Code: Select all

   ImageMagick-6.6.6-3/bin/identify -verbose with-clip.jpg  | sed -n '/<svg/,$p /<\/svg/q'
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
axelrose
Posts: 96
Joined: 2008-12-16T06:01:27-07:00

Re: which libs for clipping path recognition

Post by axelrose »

I'm using "identify -verbose" just for demonstration. The problem shows up with a different test easily:

Code: Select all

> ImageMagick-6.6.6-3/bin/identify -verbose with-clip.jpg  | grep -i clip
Image: /Users/ar/work/censhare-projects/rewe/with-clip.jpg
> ImageMagick-6.6.3-10/bin/identify -verbose with-clip.jpg  | grep -i clip
Image: /Users/ar/work/censhare-projects/rewe/with-clip.jpg
  Clipping path: 
Your command returns with an "sed" error message

Code: Select all

> ImageMagick-6.6.3-10/bin/identify -verbose with-clip.jpg  | sed -n '/<svg/,$p /<\/svg/q'
sed: 1: "/<svg/,$p /<\/svg/q": extra characters at the end of p command
It would be nice if there were some explicit command to extract the clipping path from any image as SVG.

Regards, Axel.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: which libs for clipping path recognition

Post by anthony »

applogies put a ';' after the 'p'

Code: Select all

... | sed -n '/<svg/,$p; /<\/svg/q'
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
axelrose
Posts: 96
Joined: 2008-12-16T06:01:27-07:00

Re: which libs for clipping path recognition

Post by axelrose »

Thank you for your kind correction!
axelrose
Posts: 96
Joined: 2008-12-16T06:01:27-07:00

Re: which libs for clipping path recognition

Post by axelrose »

Issue is resolved with 6.6.6-5

Thanks, Axel.
Post Reply