clip telling me no clippath found

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
mrmworth

clip telling me no clippath found

Post by mrmworth »

so i'm trying to convert a .tif into a .gif and use the clippath to remove the area defined to be clipped.
on the command line i run:
convert -clip image.tif image.gif

i end up getting the following error:
convert: no clip path defined `image.tif': No such file or directory.

now i know i have clippaths set because when i open the document in adobe it shows me them. also, if i run the following command:
identify -verbose image.tif | grep -i path

i get the following output:
0x0003ff70: d0065061 74682031 00000022 bc000600 00000000 ---Path 1---"-------
0x0006b6c0: f0004ba7 23384249 4d07d106 50617468 20320000 ---K-#8BIM---Path 2-
0x00095b50: b7000000 00000d06 50617468 20310000 00000001 ---------Path 1-----


so i'm not exactly sure what is going wrong here because the command doesn't produce a clipped gif.
anyone have any thoughts based off of the output i'm receiving?
(technical info: i'm running ImageMagick-6.3.0 on a linux machine)
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: clip telling me no clippath found

Post by magick »

Post a URL to your image so we can download it and reproduce the problem. We'll get back to your with a solution.
mrmworth

Re: clip telling me no clippath found

Post by mrmworth »

thanks for offering to help.

i posted the image i'm using here: http://worthingtonpresents.com/image/yoga.tif
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: clip telling me no clippath found

Post by magick »

We're using ImageMagick 6.3.2-9. It recognizes the clip path:
  • idenitfy -verbose yoga.tif
    ...
    Clipping path:
    <?xml version="1.0" encoding="iso-8859-1"?>
    <svg width="800" height="375">
    <g>
    <path style="fill:#00000000;stroke:#00000000;stroke-width:0;stroke-antialiasing:
    false" d="
    M 238.515,77.9703
    C 239.791,78.7825 240.951,78.8985 242.227,78.4344
    C 243.503,77.9703 247.117,77.126 250,75.9978
    C 252.668,74.9536 257.077,74.1414 261.369,74.2574
    C 265.661,74.3734 269.374,74.8375 271.462,75.3017
    C 273.55,75.7658 280.046,77.2741 282.947,78.0863
    C 285.847,78.8985 289.791,80.4069 292.691,82.1473
    C 295.592,83.8877 298.724,86.2082 300.58,87.2525
    C 302.436,88.2967 304.872,89.9211 306.845,90.8493
    C 308.817,91.7775 317.633,95.6064 319.722,96.0705
    C 321.81,96.5346 322.97,97.2308 324.362,97.4629
    C 325.754,97.6949 326.682,98.275 327.726,98.9712
    C 328.77,99.6674 332.715,101.06 336.079,102.684
    ...
mrmworth

Re: clip telling me no clippath found

Post by mrmworth »

i'm not seeing that exact output as you have for the clipping path. is that because i'm using a different version of imagemagick, or perhaps ghostscript or xml library?

if you run the command convert -clip yoga.tif yoga.gif, does it actually clip out the paths? and make that area white?

thanks for you help.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: clip telling me no clippath found

Post by magick »

The first image has a woman exercising with a black background. The second image has the woman exercising on a mat on a white background.
mrmworth

Re: clip telling me no clippath found

Post by mrmworth »

so i updated my imagemagick to the same version as you.
when i run the identify -verbose yoga.tif command, i now get the same output as you with the clipping path definition and all.

however when i run the command convert -clip yoga.tif yoga.gif the output is a blinking image:
http://worthingtonpresents.com/image/yoga.gif

i'm not sure what command you're running, perhaps different then mine?
or perhaps something else installed on my box is outdated...

thanks for your help again
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: clip telling me no clippath found

Post by anthony »

It is blinking as it generated TWO images, just as Chrisy told you he sees. IM then saves these two images into one file format. As that format is GIF you get a 2 frame animation!!!!

Try adding -delete 0 or +delete to delete either the first or last image before saving, or use +adjoin to have it save as seperate files "yoga-0.gif" and "yoga-1.gif", or save to JPEG for the same result as JPEG formats can not handle multiple images.

For more info see IM Examples, File handling, Writing multi-image sequences
http://www.imagemagick.org/Usage/files/#write_seq
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply