Page 2 of 2

Re: Convert from tiff to png not working fine

Posted: 2018-04-06T09:08:10-07:00
by fmw42
It is not polite to provide large images with a slow download site. Nevertheless after waiting a long time for the download, I find that all 4 images look the same except for the names. The command I gave previously works fine on all 4 images. Did you even try that?

Code: Select all

convert -quiet image.tif -alpha transparent -clip -alpha opaque -strip image.png

Re: Convert from tiff to png not working fine

Posted: 2018-05-24T00:47:38-07:00
by rokadeaks
Hi,
I have another tif image for which with your specified command I am getting wrong image.
https://ufile.io/slcy3

Can you please provide generic command which will work for all 5 images.
Thank you

Re: Convert from tiff to png not working fine

Posted: 2018-05-24T09:11:49-07:00
by fmw42
Your image has 3 layers, each with an alpha channel and a clip path. You have to choose whether you want the clip path or the alpha channel and which layer you want. I do not know which you want and neither would ImageMagick.

The following works for me to get the clip path of the first layer.

Code: Select all

convert -quiet image.tif[0] -alpha transparent -clip -alpha opaque -strip image.png
The following works for me to get the alpha channel of the first layer.

Code: Select all

convert -quiet image.tif[0] -strip image.png

Re: Convert from tiff to png not working fine

Posted: 2018-06-05T07:50:00-07:00
by rokadeaks
Hey sorry for late reply, And thanks for command.

btw 'convert -quiet image.tif[0] -alpha transparent -clip -alpha opaque -strip image.png'

command provided by you is working fine for most of the images but if image have Paths then seems it not working.
here is link for images
https://ufile.io/v53xi

For above images I removed paths using photoshop then with command provided by you I am getting correct image.

How can we do using command , generic command which will work for all 4 towel images & images in above link.

Thanks for help.

Re: Convert from tiff to png not working fine

Posted: 2018-06-05T08:29:43-07:00
by fmw42
I am not aware of any one unique method that will handle all cases. You could test for clip paths and alpha channels and then choose one or the other method. You could do this all with a short script, which would be OS dependent.

Re: Convert from tiff to png not working fine

Posted: 2018-06-06T01:09:00-07:00
by rokadeaks
Ok thanks i will try