문제

I'm far from an expert with images and I'm new to imagemagick. I can't find the right options (this program is far to powerful for me at the moment :-)) to convert a 64 pixel icon to 32 pixel with smooth edges. It always give me rough edges. I tried with some of the -adaptive options but I'm stuck.

Is somebody over here more skilled in this kind of things? Startimage for example is this image: http://www.iconexperience.com/_img/v_collection_png/64x64/shadow/garbage.png What are the options to resize this in to a smooth icon.

(I know, we have the icon set too, so we could just take the 32 version, but we have over a hundred different icons in 64 pixel and we need sometimes them in 32 or 24 or 16 pixels. We're trying to automate the scalingproces to produce a sprite in our framework without developers need to worry with new icons. A 64 pixel version would be enough than.)

Thanks in advance!

도움이 되었습니까?

해결책

I get smooth-looking edges from the following:

convert garbage.png -resize 50% out.png

If I use -scale instead of -resize, then I get rough edges, which is to be expected, because -scale just uses a box filter.

convert garbage.png -scale 50% out.png   ## rough edges

You can experiment with different filters like this:

convert garbage.png -filter lanczos -resize 50% out.png

http://www.imagemagick.org/script/command-line-options.php#filter

Lanczos is the default filter in this case anyway, and the result looks pretty good to me.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top