create transparency in tiff by clipping path

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
Michael1234

create transparency in tiff by clipping path

Post by Michael1234 »

Hi,

i run into a problem with creating transparent background images defined by clipping path in tif files.

convert source.tiff -fill yellow -draw "color 0 0 reset" -transparent yellow -clip -draw "Image Copy 0,0 0,0 'source.tif'" transparent.tif

results in

convert.exe: no clip path defined `source.tif': No such file or directory @ image.c/
ClipImagePath/1047.

source.tif : http://www.mediafire.com/download.php?2kzftddmqjf
(sorry for the host)

It looks to me similiar to the bug described in
http://www.mail-archive.com/magick-bugs ... 00548.html

Im using Version: ImageMagick 6.4.6 2008-11-25 Q16 http://www.imagemagick.org

Any ideas why it cant find the clipping path ?

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

Re: create transparency in tiff by clipping path

Post by magick »

Can you prove the TIFF file includes a clipping path? There could be a bug in our Photoshop parsing algorithm but the current algorithm does not show a resource block with an ID between 1999 and 2008. Is Adobe stuffing clipping paths at another ID now-a-days? If so, let us know which resource block ID it could be.

FYI. Your TIFF image returns these resource ID's:
  • 1028
    1061
    1005
    1062
    1037
    1049
    1011
    1034
    10000
    1013
    1016
    1032
    1054
    1050
    1064
    1044
    1036
    1057
    1025
Michael1234

Re: create transparency in tiff by clipping path

Post by Michael1234 »

Hi,

i made a screenshot (sorry for the host)
http://www.mediafire.com/imageview.php? ... w1ejtj5mjo

As visible in right pannel, the clipping path is there. I can use it in photoshop to mask the person. Work in photoshop.

I also uploaded thr file without an clipping path. Maybe this can help to identify the clipping path ressource. source_no_path.tif: http://www.mediafire.com/download.php?knhmyydyjzm

Any ideas ?

thanks for any help,
michael1234
Michael1234

Re: create transparency in tiff by clipping path

Post by Michael1234 »

Hi,

is there anything i can do to get this working ?

How did you identify the resource id's from the tif ?
Would clip-path ResouceID or clip-mask with ResourceID help ?


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

Re: create transparency in tiff by clipping path

Post by magick »

The clipping path is stored in resource ID 1025. It consists of a series of 26-byte path point records which are not yet implemented in ImageMagick.
Post Reply