Jump to content

TK's LCD font PERL script


ilmenator
 Share

Recommended Posts

Hi,

in an effort to do documentation of a MIDIbox project, I am using TK's PERL script to generate "screenshots" of the LCD. This is nice and fine, but the output is .gif, which is a problem for my LaTEX compiler. It just won't accept .gif as input format. Is there a way to generate e.g. .png instead of .gif from the script? I do not want another conversion step in the workflow, hence it would be nice if the script could generate .png files directly...

post-3442-050279100 1293016493_thumb.gif

Link to comment
Share on other sites

How about calling something like gif2png from the script?

Thanks for the inspiration :smile: - it's actually much easier, which I discovered when I looked at the Pixmap image format used in this script. The only thing you have to do is replace

      system("convert ${output_file}.xpm ${output_file}.gif") && die ("convert failed!\n");

with
      system("convert ${output_file}.xpm ${output_file}.png") && die ("convert failed!\n");

and the script itself will output .png format images.

Link to comment
Share on other sites

Strangeness... on my computer at home I get this error message, no matter if I try to convert to .gif or .png format. That is using ActiveState PERL 5.10 on a Win7 32 machine.

C:\mios32\SCE32\UI>perl lcd.pl

Writing 'SCE000.png'...

Unzulässiger Parameter - SCE000.png

convert failed!

Any ideas what is going wrong?

Link to comment
Share on other sites

You could try any other commandline image converter instead (system invokes a command line call) - maybe your installed version of convert does not have png output capabilites because of missing libraries or png was not configured during installation time?

You can always install cygwin, which is a nice unixy addon for windows - it should provide packages for conversion, a quick google search yielded xpm2png.sh, which is available in the libAfterimage cygwin package.

Edited by Hawkeye
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...