Get in touch:
01524 851 877
07718 896 553

Image File Conversion Script

Posted on Jan 12 2011 by Matthew Jakeman

Here’s a nice simple script to convert all the pdf files in a directory to jpg files using the convert program. To use this you will need ImageMagick installed on your Linux/Unix host.


for file in `ls *.pdf`
   convert $file `echo $file | sed 's/\.pdf$/\.jpg/'`

1 Comment

  1. Aman says:

    Also, the image that I am using is a PNG. Would that affect the code ( I have alraedy tried replacing jpg eith png )?I am using a child theme of twenty eleven by the way

Leave a comment