Forked from Alexander A. Mandl
hpi is an obscure image format created for the use of Hemera's image library browser. Its basically a compressed JPG image with an PNG image mask. You know, what today we just use a PNG image for.
So this tool written by Alexander A. Mandl combs through the compressed image binary, pulls out the image and the mask and makes a PNG out of it so you can get some use out of that ginormous box of CD's you paid top dollar for back in the day.
For it to work you'll need Perl, CPAN, and the Image::Magick Perl files all working together.
which perl
CPAN # If you haven't fired up Perl yet - this will update CPAN
upgrade # from within CPAN if so inclined
wget https://www.imagemagick.org/download/ImageMagick.tar.gz
tar xvxf ./ImageMagick.tar.gz
cd ImageMagick-7.0.7-8/
./configure -with-perl
sudo make install
perl -MImage::Magick -le 'print Image::Magick->QuantumDepth' # smoketest
If that works - you're ready to rock.
The syntax for 'one file at a time' is:
hpi2png <inputfile.hpi> <outputfile.png>
And here's a handy one-liner to convert all HPI files in the current folder:
for filename in * ; do <path/to/your>/hpi2png.pl $filename $filename.png; done