Hi,
I am searching for a process to change TIFF with path embeded inside to a PNG using this path to make transparency.
So when I open my TIFF image with Photoshop, I have the image and a path.
And, then I want to make transparency for a PNG file with this same path.
Is it possible?
How can I do it sing Imagemagick command line tool?
My tiff image :
http://superced.dyndns.org/test/test_mask.tif
Thank you!
TIFF with path to PNG with transparency
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: TIFF with path to PNG with transparency
I am very confused about what you are trying to do. Please provide more details. How do you put a tif inside a png? Can you provide an example of what you are trying to do?
Is there some tif file with some kind of clip path inside it? Do you want to convert the tif to png so that the area inside the clip path is transparent?
Please provide a link to your tif file.
Is there some tif file with some kind of clip path inside it? Do you want to convert the tif to png so that the area inside the clip path is transparent?
Please provide a link to your tif file.
Re: TIFF with path to PNG with transparency
Yes, that's it.fmw42 wrote: Is there some tif file with some kind of clip path inside it? Do you want to convert the tif to png so that the area inside the clip path is transparent?
I want to transform the tiff image into png image.
I also want thats the area outside the path embeded in the tiff file will be transparent in the png file.
I put a link to the tiff file. If you open it in Photoshop, you'll see the path.
Then I want to transform it to png and use the path to make transparency.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: TIFF with path to PNG with transparency
This seems to work, but I cannot say it is the best or most efficient way. Perhaps Anthony can comment. This is the first time I have tried using -clip and clip paths (and +clip seems to be needed, works, but is undocumented)
see http://www.imagemagick.org/script/comma ... s.php#clip
convert test_mask.tif \
\( -clip -alpha transparent -clone 0 -alpha extract +clip -negate \) \
-compose copy_opacity -composite test_mask.png
or
convert test_mask.tif \
\( -clip -threshold 100% -clone 0 +clip -fill white +opaque black -negate \) \
-compose copy_opacity -composite test_mask.png
The result may not be what you expect as the clip path does not follow the face, but is outside the face.
see http://www.imagemagick.org/script/comma ... s.php#clip
convert test_mask.tif \
\( -clip -alpha transparent -clone 0 -alpha extract +clip -negate \) \
-compose copy_opacity -composite test_mask.png
or
convert test_mask.tif \
\( -clip -threshold 100% -clone 0 +clip -fill white +opaque black -negate \) \
-compose copy_opacity -composite test_mask.png
The result may not be what you expect as the clip path does not follow the face, but is outside the face.
Re: TIFF with path to PNG with transparency
That's exactly what I wanted!
Great!
Thank you so much!
I will try it soon.
Great!
Thank you so much!
I will try it soon.
Re: TIFF with path to PNG with transparency
That's great!
It works perfectly. I don't know which is the best command.
Both seem to work well.
What do you think about this?
It works perfectly. I don't know which is the best command.
Both seem to work well.
What do you think about this?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: TIFF with path to PNG with transparency
equal, don't see why one is better than the other. take your pick.