The pdfimages
output below that there is some default compression (under the ratio
column). I recalled plumbing the depths of convert
some time ago. The depth
option did not reduce the bits per pixel. From the tests below, neither does depth
in combination with monochrome
. Additionally, it is odd that monochrome
causes the DPI to change from 200 to 508 or 509.
One possible cause of file size inflation is the use if 8 bits/pixel. From the previous tests of convert
linked to above, it seemed that the compression squeezed out space wasted by the unwanted 8 bits per pixel. From the PDF file sizes, however, it seem that if this is true, then it doesn't really make up for all of the file size inflation.
# 1st default, monochrome, 200dpi, depth 1, and combinations
convert 00?.png default.pdf
convert -monochrome 00?.png mono.pdf
convert -monochrome 00?.png -density 200x200 mono200.pdf
convert -depth 1 00?.png depth1.pdf
convert -monochrome -depth 1 00?.png monoDepth1.pdf
ls -l *.pdf
510362 default.pdf
510350 mono.pdf
510362 mono200.pdf
510362 depth1.pdf
510374 monoDepth1.pdf
for file in *.pdf ; do echo ' ' ; echo $file: ; pdfimages -list $file ; done
default.pdf:
page num type width height color comp bpc enc interp object ID x-ppi y-ppi size ratio
--------------------------------------------------------------------------------------------
1 0 image 1700 2167 gray 1 8 image no 8 0 200 200 70.1K 1.9%
2 1 image 1700 2145 gray 1 8 image no 22 0 200 200 67.8K 1.9%
3 2 image 1700 2139 gray 1 8 image no 36 0 200 200 97.8K 2.8%
4 3 image 1700 2156 gray 1 8 image no 50 0 200 200 80.2K 2.2%
5 4 image 1700 2156 gray 1 8 image no 64 0 200 200 89.9K 2.5%
6 5 image 1700 2150 gray 1 8 image no 78 0 200 200 85.2K 2.4%
mono.pdf:
page num type width height color comp bpc enc interp object ID x-ppi y-ppi size ratio
--------------------------------------------------------------------------------------------
1 0 image 1700 2167 gray 1 8 image no 8 0 200 200 70.1K 1.9%
2 1 image 1700 2145 gray 1 8 image no 22 0 200 200 67.8K 1.9%
3 2 image 1700 2139 gray 1 8 image no 36 0 200 200 97.8K 2.8%
4 3 image 1700 2156 gray 1 8 image no 50 0 200 200 80.2K 2.2%
5 4 image 1700 2156 gray 1 8 image no 64 0 200 200 89.9K 2.5%
6 5 image 1700 2150 gray 1 8 image no 78 0 200 200 85.2K 2.4%
mono200.pdf:
page num type width height color comp bpc enc interp object ID x-ppi y-ppi size ratio
--------------------------------------------------------------------------------------------
1 0 image 1700 2167 gray 1 8 image no 8 0 508 508 70.1K 1.9%
2 1 image 1700 2145 gray 1 8 image no 22 0 508 508 67.8K 1.9%
3 2 image 1700 2139 gray 1 8 image no 36 0 508 509 97.8K 2.8%
4 3 image 1700 2156 gray 1 8 image no 50 0 508 508 80.2K 2.2%
5 4 image 1700 2156 gray 1 8 image no 64 0 508 508 89.9K 2.5%
6 5 image 1700 2150 gray 1 8 image no 78 0 508 509 85.2K 2.4%
depth1.pdf:
page num type width height color comp bpc enc interp object ID x-ppi y-ppi size ratio
--------------------------------------------------------------------------------------------
1 0 image 1700 2167 gray 1 8 image no 8 0 200 200 70.1K 1.9%
2 1 image 1700 2145 gray 1 8 image no 22 0 200 200 67.8K 1.9%
3 2 image 1700 2139 gray 1 8 image no 36 0 200 200 97.8K 2.8%
4 3 image 1700 2156 gray 1 8 image no 50 0 200 200 80.2K 2.2%
5 4 image 1700 2156 gray 1 8 image no 64 0 200 200 89.9K 2.5%
6 5 image 1700 2150 gray 1 8 image no 78 0 200 200 85.2K 2.4%
monoDepth1.pdf:
page num type width height color comp bpc enc interp object ID x-ppi y-ppi size ratio
--------------------------------------------------------------------------------------------
1 0 image 1700 2167 gray 1 8 image no 8 0 200 200 70.1K 1.9%
2 1 image 1700 2145 gray 1 8 image no 22 0 200 200 67.8K 1.9%
3 2 image 1700 2139 gray 1 8 image no 36 0 200 200 97.8K 2.8%
4 3 image 1700 2156 gray 1 8 image no 50 0 200 200 80.2K 2.2%
5 4 image 1700 2156 gray 1 8 image no 64 0 200 200 89.9K 2.5%
6 5 image 1700 2150 gray 1 8 image no 78 0 200 200 85.2K 2.4%