diff --git a/main.c b/main.c index 4019765..13df756 100644 --- a/main.c +++ b/main.c @@ -161,8 +161,7 @@ static int processAudio(char *filename, options_t *opts){ // Read PNG into image buffer printf("Reading %s\n", filename); if(readRawImage(filename, img.prow, &img.nrow) == 0){ - fprintf(stderr, "Skipping %s\n", img.name); - return 0; + exit(EPERM); } }else{ // Attempt to open the audio file @@ -285,7 +284,7 @@ static int initsnd(char *filename) { infwav.format = 0; audioFile = sf_open(filename, SFM_READ, &infwav); if (audioFile == NULL) { - fprintf(stderr, "Could not open %s for reading\n", filename); + fprintf(stderr, "Could not open %s\n", filename); return 0; } diff --git a/util/img2pal.py b/util/img2pal.py index 64d7e84..f5c3753 100644 --- a/util/img2pal.py +++ b/util/img2pal.py @@ -17,10 +17,10 @@ if len(sys.argv) == 1: image = Image.open(sys.argv[1]) pixels = image.load() -sys.stdout.write("char palette[{}][3] = {{\n \"".format(image.size[1])) +sys.stdout.write("char palette[{}*3] = {{\n \"".format(image.size[1])) for y in range(1, image.size[1]+1): sys.stdout.write(''.join('\\x{:02x}'.format(a) for a in pixels[0, y-1])) if(y % 7 == 0 and y != 0): - sys.stdout.write("\",\n \"") + sys.stdout.write("\"\n \"") -print("\"\n};") \ No newline at end of file +print("\"\n};")