Page 1 of 1
[Resolved] Anti-alias image help.
Posted: 2010-10-29T12:12:35-07:00
by Cmars
Well I'm trying to make the image's edges soften so they don't look sharp (transparent background), and I can't seem to get it to work:
Code: Select all
convert "C:\imgs\a.png" -antialias "C:\imgs\a.png"
So yea, I need some help here :/
And yes, I've been searching/tried things for 7 days, but nothing works :/ <.<
Re: Anti-alias image help.
Posted: 2010-10-29T12:29:23-07:00
by Bonzo
Check this link ( will need to scroll down the page a bit ):
http://www.imagemagick.org/Usage/thumbnails/#fluff
Re: Anti-alias image help.
Posted: 2010-10-29T12:38:16-07:00
by Cmars
Ok, I can't find anything <.<
Re: Anti-alias image help.
Posted: 2010-10-29T13:03:01-07:00
by Bonzo
http://www.imagemagick.org/Usage/thumbnails/#soft_edges
I thought you were trying to do something like:
or
If not post an example of what you want.
Re: Anti-alias image help.
Posted: 2010-10-29T13:16:43-07:00
by fmw42
Cmars wrote:Well I'm trying to make the image's edges soften so they don't look sharp (transparent background), and I can't seem to get it to work:
Code: Select all
convert "C:\imgs\a.png" -antialias "C:\imgs\a.png"
So yea, I need some help here :/
And yes, I've been searching/tried things for 7 days, but nothing works :/ <.<
-antialias is a setting used with some operator such as -draw. by itself it does nothing.
I think you need to post a link to your example(s) and explain in more detail what is the issue or what you desire for the result.
Re: Anti-alias image help.
Posted: 2010-10-29T13:29:27-07:00
by Cmars
Other example:
Re: Anti-alias image help.
Posted: 2010-10-29T16:20:22-07:00
by fmw42
you need to take the mask and make it binary. then blur the mask a little with a linear ramp blur, then make the ramp taper to cut out the outside part of the blur.
Here are two ways to do that. You can adjust the -blur 1x65000 (change the 1 to 0.5 or 2 or whatever) as desired.
convert Sir_amik_varze_detail.PNG \
\( -clone 0 -alpha off \) \
\( -clone 0 -alpha extract -blur 1x65000 -level 50x100% \) \
-delete 0 -compose copy_opacity -composite Sir_amik_varze_detail1.png
convert Sir_amik_varze_detail.PNG -channel A -blur 1x65000 -level 50x100% \
-channel rgba Sir_amik_varze_detail1b.png
Re: Anti-alias image help.
Posted: 2010-10-29T17:32:25-07:00
by Cmars
fmw42 wrote:you need to take the mask and make it binary. then blur the mask a little with a linear ramp blur, then make the ramp taper to cut out the outside part of the blur.
Here are two ways to do that. You can adjust the -blur 1x65000 (change the 1 to 0.5 or 2 or whatever) as desired.
convert Sir_amik_varze_detail.PNG \
\( -clone 0 -alpha off \) \
\( -clone 0 -alpha extract -blur 1x65000 -level 50x100% \) \
-delete 0 -compose copy_opacity -composite Sir_amik_varze_detail1.png
convert Sir_amik_varze_detail.PNG -channel A -blur 1x65000 -level 50x100% \
-channel rgba Sir_amik_varze_detail1b.png
Thank you.
Re: Anti-alias image help.
Posted: 2010-10-29T18:02:04-07:00
by fmw42
if the edges pull in too much, beside making the 1 smaller, you can instead try to adjust the 50x100% (say make the 50 to 45 or 40).
Also see
http://www.imagemagick.org/Usage/channels/#mask_diff
Re: Anti-alias image help.
Posted: 2010-10-30T04:47:06-07:00
by Cmars
Thanks for all help
Re: [Resolved] Anti-alias image help.
Posted: 2010-10-31T19:27:56-07:00
by anthony
You could try using a feathering blur, of the alpha channel combined with the original channel to ensure fully-transparent pixels don't become partially transparent
http://www.imagemagick.org/Usage/blur/#feathering