pdf to 1bpp bmp

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
lowson
Posts: 2
Joined: 2013-12-12T01:46:57-07:00
Authentication code: 6789

pdf to 1bpp bmp

Post by lowson »

I need to get 1bpp bmp by converting pdf.
but always got 8/1 bit !!
Please help this, thanks a lot.

# convert -density 300 -alpha off -depth 1 test.pdf testcbmp.bmp
# convert -density 300 -monochrome -alpha off -depth 1 test.pdf testcbmp.bmp
version: ImageMagick-6.8.7-6
pdf file: http://s000.tinyupload.com/?file_id=486 ... 7792262846

$ identify -verbose testcbmp.bmp
Image: testcbmp.bmp
Format: BMP (Microsoft Windows bitmap image)
Class: DirectClass
Geometry: 2479x3504+0+0
Resolution: 118.11x118.11
Print size: 20.9889x29.6673
Units: PixelsPerCentimeter
Type: Bilevel
Base type: Bilevel
Endianess: Undefined
Colorspace: Gray
Depth: 8/1-bit
Channel depth:
gray: 1-bit
Channel statistics:
Gray:
min: 0 (0)
max: 255 (1)
mean: 244.608 (0.959245)
standard deviation: 50.4189 (0.197721)
kurtosis: 19.5796
skewness: -4.64539
Colors: 2
Histogram:
354011: ( 0, 0, 0) #000000 gray(0)
8332405: (255,255,255) #FFFFFF gray(255)
Rendering intent: Perceptual
Chromaticity:
red primary: (0.64,0.33)
green primary: (0.3,0.6)
blue primary: (0.15,0.06)
white point: (0.3127,0.329)
Background color: gray(255)
Border color: gray(223)
Matte color: gray(189)
Transparent color: gray(0)
Interlace: None
Intensity: Undefined
Compose: Over
Page geometry: 2479x3504+0+0
Dispose: Undefined
Iterations: 0
Compression: Undefined
Orientation: Undefined
Properties:
date:create: 2013-12-12T17:06:11+08:00
date:modify: 2013-12-12T17:06:11+08:00
signature: fe72d97e89e84cab1d80f8f9d8cf635cf98e0e306c7b3b6eb97cc8bcd80f7680
Artifacts:
filename: testcbmp.bmp
verbose: true
Tainted: True
Filesize: 26.07MB
Number pixels: 8.686M
Pixels per second: 108.6MB
User time: 0.080u
Elapsed time: 0:01.080
Version: ImageMagick 6.8.7-6 Q16 i686 2013-11-22 http://www.imagemagick.org
lowson
Posts: 2
Joined: 2013-12-12T01:46:57-07:00
Authentication code: 6789

Re: pdf to 1bpp bmp

Post by lowson »

I found the solution. :D
#convert -density 300 -type bilevel -alpha off -depth 1 -colors 2 test.pdf testcbmp.bmp

$ identify -verbose testcbmp.bmp
Image: testcbmp.bmp
Format: BMP (Microsoft Windows bitmap image)
Class: PseudoClass
Geometry: 2479x3504+0+0
Resolution: 118.11x118.11
Print size: 20.9889x29.6673
Units: PixelsPerCentimeter
Type: Bilevel
Base type: Bilevel
Endianess: Undefined
Colorspace: Gray
Depth: 1-bit
Channel depth:
gray: 1-bit
Channel statistics:
Gray:
min: 0 (0)
max: 1 (1)
mean: 0.958621 (0.958621)
standard deviation: 0.199166 (0.199166)
kurtosis: 19.2098
skewness: -4.60541
Colors: 2
Histogram:
359439: ( 0, 0, 0) #000000 gray(0)
8326977: (255,255,255) #FFFFFF gray(255)
Colormap entries: 2
Colormap:
0: ( 0, 0, 0) #000000 gray(0)
1: (255,255,255) #FFFFFF gray(255)
Rendering intent: Perceptual
Chromaticity:
red primary: (0,0)
green primary: (0,0)
blue primary: (0,0)
white point: (0.3127,0.329)
Background color: gray(255)
Border color: gray(223)
Matte color: gray(189)
Transparent color: gray(0)
Interlace: None
Intensity: Undefined
Compose: Over
Page geometry: 2479x3504+0+0
Dispose: Undefined
Iterations: 0
Compression: Undefined
Orientation: Undefined
Properties:
date:create: 2013-12-12T17:53:39+08:00
date:modify: 2013-12-12T17:53:39+08:00
signature: ab1b3e9e0a58f4c47f821aff8f7040dc6da4d24d94f4766459d889886ad22e5e
Artifacts:
filename: testcbmp.bmp
verbose: true
Tainted: True
Filesize: 1.093MB
Number pixels: 8.686M
Pixels per second: 289.5MB
User time: 0.080u
Elapsed time: 0:01.029
Version: ImageMagick 6.8.7-6 Q16 i686 2013-11-22 http://www.imagemagick.org
Post Reply