Resize PNG ignores specified depth
Posted: 2014-06-12T12:13:48-07:00
I have a PNG with 1-bit color. I'm trying to resize it. Identify shows this for the original:
If I resize it like this:
The resulting file looks like this:
How do I resize the image while retaining 1-bit depth?
Code: Select all
Format: PNG (Portable Network Graphics)
Class: PseudoClass
Geometry: 180x192
Type: Bilevel
Endianess: Undefined
Colorspace: Gray
Channel depth:
Gray: 1-bits
Channel statistics:
Gray:
Min: 0 (0)
Max: 1 (1)
Mean: 0.596644 (0.596644)
Standard deviation: 0.490571 (0.490571)
Colors: 2
Code: Select all
convert -resize x115 -depth 1 original.png smaller.png
Code: Select all
Format: PNG (Portable Network Graphics)
Class: DirectClass
Geometry: 108x115
Type: Grayscale
Endianess: Undefined
Colorspace: Gray
Channel depth:
Gray: 8-bits
Channel statistics:
Gray:
Min: 0 (0)
Max: 255 (1)
Mean: 152.01 (0.596119)
Standard deviation: 116.442 (0.456636)
Colors: 246