I'm working on a project that will receive hundreds of images with a clipping path. Each image will be saved in one version as a JPG with a white background and as a PSD with transparent background.
When using IM to clip the image I get a very jagged result where the clipping path is, very much like when you not using anti-aliased in Photoshop.
I haven't found any option to "-clip" with an anti-aliased option and after some searching I found a workaround that blurs the mask created from the -clip option. However the result doing this approach is not satisfying, you still see the jagginess but a little blurred.
The left one is made in IM the right one from Photoshop
Is there anyway to get this better with IM?
Thanks
Jan
Anti-aliased clipping path
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Anti-aliased clipping path
A better way is probably to extract the clip path as SVG, and rasterize that. See for example viewtopic.php?f=1&t=29674&p=133783
snibgo's IM pages: im.snibgo.com
Re: Anti-aliased clipping path
I did as the example in the post and it got a little better but there is still more jaggines than with Photoshop.
This is the syntax I used
There is a mention of +dither in one of the comments, where in the syntax should that be added?
Thanks
Jan
This is the syntax I used
Code: Select all
identify -quiet -format "%[8BIM:1999,2998:#1]" input.jpg | convert -quiet input.jpg ( - -negate ) -alpha off -compose copy_opacity -composite output.psd
Thanks
Jan
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Anti-aliased clipping path
I can't see that "+dither" would have any effect.
snibgo's IM pages: im.snibgo.com