如何给数码照片添加日期

By admin, 14 五月, 2015

方法比较复杂,不懂命令行的勿进。

1. Install ImageMagick

How to do it is up to you. Personally I installed the MacPorts first, then installed ImageMagick by running a simple command “sudo port install ImageMagick” in a terminal on a Mac running Leopard. You can certainly try the pre-compiled binaries if you’d like.

2. Get the font

To make it look like the old 35mm point-and-shoot film camera’s time stamp, you can use a LCD font. Simply downloaded it and unpacked it somewhere. You don’t have to install the fonts. The script can work by a direct link to the font file location.

3. Get the code

4. Do the work

Copy the code into a text editor, save it as “dtstamp.sh” or anything you like. Please note you need to change the 3rd line in the code to point to the font file location.

Run the following command to make it executable

chmod +x dtstamp.sh
To use it, simply run it like this

./dtstamp.sh directory/*.jpg
Or,

./dtstamp.sh file1.jpg file2.jpg...
After it runs, the script will produce files with “_DT” inserted between the original file name and file extension. The original file is unmodified.

Reference: http://dptnt.com/2009/08/add-date-time-stamp-to-jpeg-photos-using-free-s...

 
 
附件
dtstamp.sh (1.44 KB)

评论

Restricted HTML

  • 允许的HTML标签:<a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <img src>
  • 自动断行和分段。
  • 网页和电子邮件地址自动转换为链接。
验证码
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
请输入"Drupal10"