Page 1 of 1
TIFF with path to PNG with transparency
Posted: 2009-08-26T08:16:31-07:00
by SuperCed
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!
Re: TIFF with path to PNG with transparency
Posted: 2009-08-26T09:43:37-07:00
by fmw42
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.
Re: TIFF with path to PNG with transparency
Posted: 2009-08-26T10:27:28-07:00
by SuperCed
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?
Yes, that's it.
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.
Re: TIFF with path to PNG with transparency
Posted: 2009-08-26T10:54:09-07:00
by fmw42
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.
Re: TIFF with path to PNG with transparency
Posted: 2009-08-27T03:19:02-07:00
by SuperCed
That's exactly what I wanted!
Great!
Thank you so much!
I will try it soon.
Re: TIFF with path to PNG with transparency
Posted: 2009-08-27T03:31:39-07:00
by SuperCed
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?
Re: TIFF with path to PNG with transparency
Posted: 2009-08-27T08:31:12-07:00
by fmw42
equal, don't see why one is better than the other. take your pick.