From cf38e238d4bf21368be830f3acae432e141c5066 Mon Sep 17 00:00:00 2001 From: leejet Date: Mon, 4 Sep 2023 20:48:11 +0800 Subject: [PATCH] fix: width and height should be a multiple of 64 --- examples/main.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/main.cpp b/examples/main.cpp index cfb73c1..fd2c9c9 100644 --- a/examples/main.cpp +++ b/examples/main.cpp @@ -285,13 +285,13 @@ void parse_args(int argc, const char* argv[], Option* opt) { exit(1); } - if (opt->w <= 0 || opt->w % 32 != 0) { - fprintf(stderr, "error: the width must be a multiple of 32\n"); + if (opt->w <= 0 || opt->w % 64 != 0) { + fprintf(stderr, "error: the width must be a multiple of 64\n"); exit(1); } - if (opt->h <= 0 || opt->h % 32 != 0) { - fprintf(stderr, "error: the height must be a multiple of 32\n"); + if (opt->h <= 0 || opt->h % 64 != 0) { + fprintf(stderr, "error: the height must be a multiple of 64\n"); exit(1); } @@ -337,13 +337,13 @@ int main(int argc, const char* argv[]) { free(img_data); return 1; } - if (opt.w <= 0 || opt.w % 32 != 0) { - fprintf(stderr, "error: the width of image must be a multiple of 32\n"); + if (opt.w <= 0 || opt.w % 64 != 0) { + fprintf(stderr, "error: the width of image must be a multiple of 64\n"); free(img_data); return 1; } - if (opt.h <= 0 || opt.h % 32 != 0) { - fprintf(stderr, "error: the height of image must be a multiple of 32\n"); + if (opt.h <= 0 || opt.h % 64 != 0) { + fprintf(stderr, "error: the height of image must be a multiple of 64\n"); free(img_data); return 1; }