debian: บันทึก imagemagick - convert

แปลงรูปจาก jpg ธรรมดา ไปเป็น jpg แบบ interlace
ใช้คำสั่งคือ
# mkdir temp
# for i in *jpg; do convert $i -interlace line temp/$i ; done

จะได้ไฟล์ jpg ชุดใหม่เข้าไปอยู่ในไดเรกทอรี่ temp
แปลงหลายรูป จาก tif ไปเป็น pdf
# convert -adjoin `ls *.tif` newfile.pdf
เอามาจาก jmetrix : Viewing multiple page tif on Linux
แปลง tif หลายไฟล์ไปเป็น tif ไฟล์เดียวหลายภาพ
$ convert x1.tif x2.tif x3.tif -adjoin newfile.tif
แตก tif แบบหลายภาพ ออกมาเป็นหลายไฟล์ ไฟล์ละหนึ่งหน้า
$ convert x.tif x%d.tif
จะได้ออกมาเป็น x1.tif x2.tif x3.tif
เอามาจาก [magick-users] how to split multi-page tiff into single pages
แปลง tif แบบ 8-bit ไปเป็น 4-bit 256 สี เพื่อลดขนาด และสามารถเปิดใน Windows ได้คล่องตัวขึ้น
เทคนิคคือแปลงเป็น gif ก่อน ไม่งั้นแปลงแล้วเปิดไม่ได้
$ convert x.tif /tmp/x.gif
$ convert /tmp/x.gif -depth 4 x.tif

หมายเหตุ
ต้องลงแพกเกจ imagemagick ก่อน
# aptitude install imagemagick