basisu -info (PNG): a file over the loader's dimension cap is a failure (EXIT_FAILURE)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Richard Geldreich
2026-10-23 18:01:18 -04:00
co-authored by Claude Opus 5.5
parent 5586688df4
commit 1fca0b9737
+5 -1
View File
@@ -5433,7 +5433,11 @@ static bool print_png_info(const char* pInput_filename, const uint8_vec& file_da
}
printf("Dimensions: %ux%u\n", width, height);
if ((width > BASISU_WUFFS_LDR_MAX_DIM) || (height > BASISU_WUFFS_LDR_MAX_DIM))
printf("Exceeds the maximum loadable dimension (%u), this file can't be loaded\n", (uint32_t)BASISU_WUFFS_LDR_MAX_DIM);
{
// A file the loader can't load is a failure (EXIT_FAILURE), even though its header was printed.
error_printf("Exceeds the maximum loadable dimension (%u), this file can't be loaded\n", (uint32_t)BASISU_WUFFS_LDR_MAX_DIM);
return false;
}
return true;
#else
pv_png::png_info info;