This blog has moved! Redirecting...
You should be automatically redirected. If not, visit http://scrolls.mafgani.net/ and update your bookmarks.

Tuesday, May 08, 2007

Mass conversion of images

The following "one-liner" can be used to mass convert a given image format into another using the convert (part of ImageMagick) and basename tools:


$ for A in $(ls *.$SRC_TYPE); do convert $A $(basename $A .$SRC_TYPE).$DST_TYPE; done


where $SRC_TYPE is the file suffix of the original images (e.g. png) and $DST_TYPE is the file suffix of the type desired (e.g. eps).

0 Comments:

Post a Comment

<< Home