Page 1 of 1

Jpeg to transparent PNG problem

Posted: 2014-11-11T05:38:01-07:00
by stevef66
Hello

I have installed ImageMagick 6.8.9-10 on a RHEL5 64bit server and am trying to convert jpeg files with clipping paths to png files with the area outside the clipping path made transparent.

The following command creates the transparent background, but parts of the area inside the original clipping path are also made transparent:
convert +clip-mask -transparent white original.jpg result.png

This command creates a png with the area outside the original clipping path opaque:
convert original.jpg -alpha transparent -clip -alpha opaque result.png

However the above command does work on another server running RHEL6 64bit with Image Magick 6.5.4-7. Unfortunately I need to get this working on the RHEL5 server. Any help would be really appreciated.

Link to file is:
https://dl.dropboxusercontent.com/u/264 ... iginal.jpg

Thanks

Re: Jpeg to transparent PNG problem

Posted: 2014-11-11T07:01:39-07:00
by snibgo
Clipping paths have improved quite a lot in recent months, let alone the many years since v6.5.4.

Re: Jpeg to transparent PNG problem

Posted: 2014-11-11T08:15:00-07:00
by stevef66
Thanks for your response, but not sure I understand you correctly.

It's working with 6.5.4-7 on RHEL 6, but not on RHEL5 with 6.8.9-10.

Would be grateful for any suggestions as to what maybe causing this.

Thanks

Re: Jpeg to transparent PNG problem

Posted: 2014-11-11T19:14:02-07:00
by snibgo
I don't understand what problem you want to solve.

The command:

Code: Select all

convert original.jpg -alpha transparent -clip -alpha opaque result.png
works fine for me (IM v6.8.9-5), making the background transparent.

Re: Jpeg to transparent PNG problem

Posted: 2014-11-12T00:25:55-07:00
by stevef66
The problem is that it doesn't work on my RHEL5 system. Have you any idea why that may be?

When the command is run I don't see any errors - missing delegates, etc. Can anyone please suggest a way of trouble shooting this?

Re: Jpeg to transparent PNG problem

Posted: 2014-11-12T09:49:19-07:00
by fmw42
My guess is that it was a bug in that version and won't be fixed for that version. You will likely have to upgrade further to a version that works. You can check the changelog to see if you can find an entry where it was fixed. See http://www.imagemagick.org/script/changelog.php

Re: Jpeg to transparent PNG problem

Posted: 2014-11-14T05:33:07-07:00
by stevef66
Thanks for your response.

Unfortunately the problem occurs in 6.8.9-10 which is the latest version.

Is this not likely to be caused by a version of a library since it's works on RHEL6 with Image Magick version 6.5.4-7?