Free Palestine🇵🇸🇵🇸🇵🇸Cross platform super fast single header c++ library to get image size and format without loading/decoding. Support avif, bmp, cur, dds, gif, hdr (pic), heic (heif), icns, ico, j2k, jp2, jpeg (jpg), jpx, ktx, png, psd, qoi, tga, tiff (tif), webp ...
Currently if the likely_formats is not met, it goes on to search all other formats. Which may not be needed by the application.
We can make it into 3 stages:
likely_formats: Checks those first, which is a hint given by the programmer that this file is very likely to be in that format. Say the user gave a .png file, then the library can start parsing using the png parser.
supported_formats: If likely_formats failed, it starts looking into the supported formats only, instead of looking into the entire map.
Every other format: If all else fails and the boolean argument must_be_one_of_likely_formats is false, then it starts checking against all other formats.
It is also possible to do it in another way, which is we add a single optional format at the top stage, called very_likely_format, which is hinted to the library by the programmer that this format must be checked first, as it is very likely true. Then it can go in likely_formats to look if it wasn't that format.
Currently if the
likely_formats
is not met, it goes on to search all other formats. Which may not be needed by the application.We can make it into 3 stages:
likely_formats
: Checks those first, which is a hint given by the programmer that this file is very likely to be in that format. Say the user gave a.png
file, then the library can start parsing using the png parser.supported_formats
: Iflikely_formats
failed, it starts looking into the supported formats only, instead of looking into the entire map.must_be_one_of_likely_formats
is false, then it starts checking against all other formats.It is also possible to do it in another way, which is we add a single optional format at the top stage, called
very_likely_format
, which is hinted to the library by the programmer that this format must be checked first, as it is very likely true. Then it can go inlikely_formats
to look if it wasn't that format.