mirror of
https://github.com/BinomialLLC/basis_universal.git
synced 2026-10-28 19:55:30 +00:00
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:
co-authored by
Claude Opus 5.5
parent
5586688df4
commit
1fca0b9737
+5
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user