INNER CODE UNIT · Python

debugOut

Hykudoru/Pescado-Engine-Embedded-ESP32S3 · lib/TFT_eSPI-2.5.34/Tools/bmp2array4bit/bmp2array4bit.py:35

def debugOut(s):
    if debug:
        print(s)

# look at arguments
parser = argparse.ArgumentParser(description="Convert bmp file to C array")
parser.add_argument("-v", "--verbose", help="debug output", action="store_true")
parser.add_argument("input", help="input file name")
parser.add_argument("-o", "--output", help="output file name")
args = parser.parse_args()

if not os.path.exists(args.input):
    parser.print_help()
    print("The input file {} does not exist".format(args.input))
    sys.exit(1)

if args.output == None:
    output = os.path.basename(args.input).replace(".bmp", ".c")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…