I have a big set of small png pictures that contain only white and black pixels
I use this command to resize them:
find . -name '*.png' -execdir mogrify -resize 28x28 -background white -gravity center -extent 28x28 {} \;
It processes them by 4000 files per minute. But _it makes some pixels grey_, not black and not white.
I need only black and white, so tried to use another command:
find . -name '*.png' -execdir mogrify -resize 28x28 -background white -gravity center -extent 28x28 -colors 2 -depth 8 -alpha off {} \;
This command processes them 300 files per minute and this is too slow for me.
What should I do? Is it possible to resize without making shadows ?
Resize without shadows ?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Resize without shadows ?
These aren't shadows, but antialiasing, caused by IM taking some weighted average of black and white. A cure is to use a "-filter" setting. I forget which; perhaps point or box. (This will also be faster.)
See http://www.imagemagick.org/script/comma ... php#filter
See http://www.imagemagick.org/script/comma ... php#filter
snibgo's IM pages: im.snibgo.com
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Resize without shadows ?
-filter point is what I think snibgo is suggesting