ilmenator Posted December 22, 2010 Report Posted December 22, 2010 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... Quote
nILS Posted December 22, 2010 Report Posted December 22, 2010 How about calling something like gif2png from the script? Quote
ilmenator Posted December 22, 2010 Author Report Posted December 22, 2010 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. Quote
ilmenator Posted December 22, 2010 Author Report Posted December 22, 2010 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? Quote
Hawkeye Posted December 22, 2010 Report Posted December 22, 2010 (edited) 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 December 22, 2010 by Hawkeye Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.