Fastest way to 'rescale' a b&w image?
Posted: 2009-07-01T18:33:26-07:00
I have a 200x200 black and white image - see end for the identify output for it.
I would like to change it into a 100x100 black and white image. Right now I am using the API, doing the equivalent of a -rescale (which seemed to change it to greyscale) and then a bilevel-chanel to make it true ones and zeros again (well, 65,535 and 0). My image analysis is simple enough that b&w seems to be good enough.
What is the very fastest way to do it?
Thanks!
Pito
p.s. Here is the 'identify' output for the source.
Identify -verbose /Volumes/ExternalHD2/Ballots/Leon/EV976-29/work/2819-1.TIF
Image: /Volumes/ExternalHD2/Ballots/Leon/EV976-29/work/2819-1.TIF
Format: TIFF (Tagged Image File Format)
Class: DirectClass
Geometry: 2563x4260+0+0
Resolution: 300x300
Print size: 8.54333x14.2
Units: PixelsPerInch
Type: Bilevel
Base type: Bilevel
Endianess: MSB
Colorspace: RGB
Depth: 1-bit
Channel depth:
gray: 1-bit
Channel statistics:
gray:
min: 0 (0)
max: 1 (1)
mean: 0.891633 (0.891633)
standard deviation: 0.310844 (0.310844)
kurtosis: 4.3494
skewness: -2.5198
Histogram:
9735183: (255,255,255) #FFFFFF white
1183197: ( 0, 0, 0) #000000 black
Rendering intent: Undefined
Interlace: None
Background color: white
Border color: rgb(223,223,223)
Matte color: grey74
Transparent color: black
Page geometry: 2563x4260+0+0
Dispose: Undefined
Iterations: 0
Compression: Group4
Orientation: TopLeft
Properties:
create-date: 2009-07-01T21:26:10-04:00
modify-date: 2009-06-04T00:10:09-04:00
signature: 3b6de946897afa4dd571f8e37f224c852ef3d0b5a5325fb4f4d83cf83c39fe0b
tiff:rows-per-strip: 4260
tiff:software: Pixel Translations Inc., PIXTIFF Version 56.0.218.1093
Artifacts:
verbose: true
Tainted: False
Filesize: 217kb
Number pixels: 10.41mb
Version: ImageMagick 6.5.1-0 2009-04-24 Q16 http://www.imagemagick.org
I would like to change it into a 100x100 black and white image. Right now I am using the API, doing the equivalent of a -rescale (which seemed to change it to greyscale) and then a bilevel-chanel to make it true ones and zeros again (well, 65,535 and 0). My image analysis is simple enough that b&w seems to be good enough.
What is the very fastest way to do it?
Thanks!
Pito
p.s. Here is the 'identify' output for the source.
Identify -verbose /Volumes/ExternalHD2/Ballots/Leon/EV976-29/work/2819-1.TIF
Image: /Volumes/ExternalHD2/Ballots/Leon/EV976-29/work/2819-1.TIF
Format: TIFF (Tagged Image File Format)
Class: DirectClass
Geometry: 2563x4260+0+0
Resolution: 300x300
Print size: 8.54333x14.2
Units: PixelsPerInch
Type: Bilevel
Base type: Bilevel
Endianess: MSB
Colorspace: RGB
Depth: 1-bit
Channel depth:
gray: 1-bit
Channel statistics:
gray:
min: 0 (0)
max: 1 (1)
mean: 0.891633 (0.891633)
standard deviation: 0.310844 (0.310844)
kurtosis: 4.3494
skewness: -2.5198
Histogram:
9735183: (255,255,255) #FFFFFF white
1183197: ( 0, 0, 0) #000000 black
Rendering intent: Undefined
Interlace: None
Background color: white
Border color: rgb(223,223,223)
Matte color: grey74
Transparent color: black
Page geometry: 2563x4260+0+0
Dispose: Undefined
Iterations: 0
Compression: Group4
Orientation: TopLeft
Properties:
create-date: 2009-07-01T21:26:10-04:00
modify-date: 2009-06-04T00:10:09-04:00
signature: 3b6de946897afa4dd571f8e37f224c852ef3d0b5a5325fb4f4d83cf83c39fe0b
tiff:rows-per-strip: 4260
tiff:software: Pixel Translations Inc., PIXTIFF Version 56.0.218.1093
Artifacts:
verbose: true
Tainted: False
Filesize: 217kb
Number pixels: 10.41mb
Version: ImageMagick 6.5.1-0 2009-04-24 Q16 http://www.imagemagick.org