Skip to content

Commit cf38e23

Browse files
committed
fix: width and height should be a multiple of 64
1 parent b247581 commit cf38e23

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

examples/main.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -285,13 +285,13 @@ void parse_args(int argc, const char* argv[], Option* opt) {
285285
exit(1);
286286
}
287287

288-
if (opt->w <= 0 || opt->w % 32 != 0) {
289-
fprintf(stderr, "error: the width must be a multiple of 32\n");
288+
if (opt->w <= 0 || opt->w % 64 != 0) {
289+
fprintf(stderr, "error: the width must be a multiple of 64\n");
290290
exit(1);
291291
}
292292

293-
if (opt->h <= 0 || opt->h % 32 != 0) {
294-
fprintf(stderr, "error: the height must be a multiple of 32\n");
293+
if (opt->h <= 0 || opt->h % 64 != 0) {
294+
fprintf(stderr, "error: the height must be a multiple of 64\n");
295295
exit(1);
296296
}
297297

@@ -337,13 +337,13 @@ int main(int argc, const char* argv[]) {
337337
free(img_data);
338338
return 1;
339339
}
340-
if (opt.w <= 0 || opt.w % 32 != 0) {
341-
fprintf(stderr, "error: the width of image must be a multiple of 32\n");
340+
if (opt.w <= 0 || opt.w % 64 != 0) {
341+
fprintf(stderr, "error: the width of image must be a multiple of 64\n");
342342
free(img_data);
343343
return 1;
344344
}
345-
if (opt.h <= 0 || opt.h % 32 != 0) {
346-
fprintf(stderr, "error: the height of image must be a multiple of 32\n");
345+
if (opt.h <= 0 || opt.h % 64 != 0) {
346+
fprintf(stderr, "error: the height of image must be a multiple of 64\n");
347347
free(img_data);
348348
return 1;
349349
}

0 commit comments

Comments
 (0)