I have about 190 image files (png and jpg) in a directory. For more information, each image has 2500 x 3072 pixels, and about 500KB.
I use the command convert
from ImageMagik to convert and combine them into a pdf file:
convert * my.pdf
It takes about 10GB (at peak) and 4 hours to create a 80MB pdf file.
I firstly failed to run it, because I don't have enough free space in my /tmp
(actually in my /
partition). Then I had to find a external hdd with abundant free space, and set the environment variable TMPDIR
to point to it, and then succeeded.
I wonder if there is some other software to convert and combine the images into a pdf file besides convert
, so as to eliminate the need for an external hdd? Or is it typical that such conversion and combination requires similar amount of temporary space from the disk?
More information of the image files, for example,
$ exiftool 1.jpg
ExifTool Version Number : 8.60
File Name : 1.jpg
Directory : .
File Size : 453 kB
File Modification Date/Time : 2014:11:15 13:41:55-05:00
File Permissions : rwxrwx---
File Type : JPEG
MIME Type : image/jpeg
JFIF Version : 1.01
Resolution Unit : None
X Resolution : 1
Y Resolution : 1
Image Width : 2500
Image Height : 3072
Encoding Process : Baseline DCT, Huffman coding
Bits Per Sample : 8
Color Components : 3
Y Cb Cr Sub Sampling : YCbCr4:2:0 (2 2)
Image Size : 2500x3072
$ exiftool 2.png
ExifTool Version Number : 8.60
File Name : 2.png
Directory : .
File Size : 310 kB
File Modification Date/Time : 2014:11:15 13:50:58-05:00
File Permissions : rwxrwx---
File Type : PNG
MIME Type : image/png
Image Width : 2500
Image Height : 3072
Bit Depth : 8
Color Type : Grayscale
Compression : Deflate/Inflate
Filter : Adaptive
Interlace : Noninterlaced
Pixels Per Unit X : 11929
Pixels Per Unit Y : 11929
Pixel Units : Meters
Image Size : 2500x3072