mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 18:52:07 +00:00
@@ -131,17 +131,17 @@ int main(int argc, char *argv[])
|
||||
if (png_options.trim)
|
||||
opts.trim = png_options.trim;
|
||||
|
||||
|
||||
if (raw_image->width % 8 || raw_image->height % 8) {
|
||||
errx(1, "Input PNG file %s not sized correctly. "
|
||||
"The image's width and height must be multiples of 8.",
|
||||
opts.infile);
|
||||
errx(1, "Input PNG file %s not sized correctly. The image's width and height must be multiples of 8.",
|
||||
opts.infile);
|
||||
}
|
||||
|
||||
if (opts.trim &&
|
||||
opts.trim > (raw_image->width / 8) * (raw_image->height / 8) - 1) {
|
||||
errx(1, "Trim (%i) for input raw_image file '%s' too large (max: %i)",
|
||||
opts.trim, opts.infile,
|
||||
(raw_image->width / 8) * (raw_image->height / 8) - 1);
|
||||
opts.trim, opts.infile,
|
||||
(raw_image->width / 8) * (raw_image->height / 8) - 1);
|
||||
}
|
||||
|
||||
if (strcmp(png_options.mapfile, opts.mapfile) != 0) {
|
||||
@@ -236,9 +236,8 @@ int main(int argc, char *argv[])
|
||||
if (*opts.palfile)
|
||||
output_palette_file(&opts, raw_image);
|
||||
|
||||
if (opts.fix || opts.debug) {
|
||||
if (opts.fix || opts.debug)
|
||||
output_png_file(&opts, &png_options, raw_image);
|
||||
}
|
||||
|
||||
destroy_raw_image(&raw_image);
|
||||
free(gb.data);
|
||||
|
||||
Reference in New Issue
Block a user