in reply to ImageMagick too slow

If you can live with limitations, piping your file through IJG's cjpeg, jpegtran and djpeg tools will be much faster than ImageMagick.

--
$,="\n";foreach(split('',"\3\3\3c>\0>c\177cc\0~c~``\0cc\177cc")) {$a++;$_=unpack('B8',$_);tr,01,\40#,;$b[$a%6].=$_};print@b,"\n"