Gap between clip-path and image content
Posted: 2016-05-12T08:31:57-07:00
Hi!
We are about to switch from ImageMagick 6.9 to 7.0 in our application and so I have done some testing and found a problem in the clipping operation. Usually we take a TIF image with a path and convert it into a PNG with the background removed using the following command:
convert image.tif -alpha transparent -clip -alpha opaque -strip image.png
And here is the problem:
With IM 6 the image was clipped "closer". The edge between the image and the transparency was barely visible. With IM 7 this edge is much more noticeable. For example when I set the PNG image on a black background there are white pixels all around the image.
Here are two examples:
http://www.awg88.de/imagemagick/2016-05-12/image_v6.png
http://www.awg88.de/imagemagick/2016-05-12/image_v7.png
The first one is made with IM ImageMagick-6.9.3-Q16 and the second one with ImageMagick-7.0.1-Q16. You can see the difference when you switch between the two images. There are much more white pixels around the image in the second image.
Here are some questions:
- any suggestions on how to get the same/better results as in IM 6?
- is it possible to adjust the distance between the clip-path and the image?
- is it possible to create the alpha-channel with antialiasing around the edges?
The original TIF image can be downloaded here:
http://www.awg88.de/imagemagick/2016-05-12/image.tif
Any help would be appreciated!
JD
We are about to switch from ImageMagick 6.9 to 7.0 in our application and so I have done some testing and found a problem in the clipping operation. Usually we take a TIF image with a path and convert it into a PNG with the background removed using the following command:
convert image.tif -alpha transparent -clip -alpha opaque -strip image.png
And here is the problem:
With IM 6 the image was clipped "closer". The edge between the image and the transparency was barely visible. With IM 7 this edge is much more noticeable. For example when I set the PNG image on a black background there are white pixels all around the image.
Here are two examples:
http://www.awg88.de/imagemagick/2016-05-12/image_v6.png
http://www.awg88.de/imagemagick/2016-05-12/image_v7.png
The first one is made with IM ImageMagick-6.9.3-Q16 and the second one with ImageMagick-7.0.1-Q16. You can see the difference when you switch between the two images. There are much more white pixels around the image in the second image.
Here are some questions:
- any suggestions on how to get the same/better results as in IM 6?
- is it possible to adjust the distance between the clip-path and the image?
- is it possible to create the alpha-channel with antialiasing around the edges?
The original TIF image can be downloaded here:
http://www.awg88.de/imagemagick/2016-05-12/image.tif
Any help would be appreciated!
JD