不去查一下也真的不知道,原來Linux在處理一些看似簡單的圖片task時,竟然比Windows容易得多!
How to merge JPG Files?
Linux:
- Convert a pair of JPEGs into PPM bitmaps, for use by "ppmcat"
djpeg photo1.jpg > photo1.ppm
djpeg photo2.jpg > photo2.ppm - Concatenate the photos together, into a new PPM bitmap
pnmcat -leftright photo1.ppm photo2.ppm > bigphoto.ppm - Concvert the new PPM back into a JPEG
cjpeg bigphoto.ppm > bigphoto.jpg - Clean up!
rm photo1.ppm photo2.ppm bigphoto.ppm
Windows using GIMP:
- Open the first image
- Open the second image
- Determine the total size you need your new image to be, depending on how you want them laid out. One next to the other? One on top of another? A 2x2 grid of four images? Et cetera...
- Resize one of the images to this new size
- Copy the second image
- Paste the second image into the first
- 'Anchor' the second image into the first's background layer
- Save your NEW image
結論:假如要處理100個JPG files呢?用Windows來手動基本上不可能,但用Linux寫一個script便搞掂了.
No comments:
Post a Comment