From a618d6d9f1510feb94138ffcba0e6f9e78151b09 Mon Sep 17 00:00:00 2001 From: tangstad Date: Wed, 9 Nov 2005 19:10:38 +0000 Subject: [PATCH] Fixed errorhandling/message when no files have been provided. --- gba/tools/img2bin.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gba/tools/img2bin.py b/gba/tools/img2bin.py index a574950..0e8f204 100644 --- a/gba/tools/img2bin.py +++ b/gba/tools/img2bin.py @@ -1,12 +1,14 @@ #!/usr/bin/python from PIL import Image import sys +import os """Convert image to raw binary using Python Imaging Library.""" if len(sys.argv) != 3: - print "Usage: %s " + print "Usage: %s " % os.path.split(sys.argv[0])[1] print "WARNING: It only converts 8x8 pixel images at 8bit the moment." + sys.exit() im = Image.open(sys.argv[1]) output = open(sys.argv[2], "wb")