howto_convert_to_png_from_pcx

Converting to PNG from PCX - Converting from PCX to PNG - Using Linux

Converting images if there are more than one or to can be a daunting task, converting nearly 900 of them from PCX to PNG in order to make them available for a larger public seemed like an impossibility, however a quick search got me to ImageMagick and next I knew I was scripting along, I know its crude and it can be beautified but it works.

The following requires that you have Imagemagick installed

for img in `ls *.pcx`; do convert $img $img.png; done

Changing the file name ending to the correct ending

for f in *.PCX.png ; do mv $f `basename $f PCX.png`.png; done

 
<!-- AddThis Button BEGIN -->
<a class="addthis_button" href="http://addthis.com/bookmark.php?v=250&amp;username=xa-4beeaaab61b514bf"><img src="http://s7.addthis.com/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a><script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=xa-4beeaaab61b514bf"></script>
<!-- AddThis Button END -->
<br>
<br>

Share this knowledge with your friends!

howto_convert_to_png_from_pcx.txt · Last modified: 2012/03/09 10:43 (external edit)