In addition to returning a size, it would be useful to return the image type (PNG, JPG, etc).
The implementation of ImageSizeGetter.getSize seems to cycle though each image format, to check if it's a valid image, and then return the size for the first valid one. It would be useful to also return the image type, so this can be used by the caller.
Why
To validate the image is the expected file format, or to just determine the file format.
Platforms
dart
Description
In addition to returning a size, it would be useful to return the image type (PNG, JPG, etc).
The implementation of
ImageSizeGetter.getSize
seems to cycle though each image format, to check if it's a valid image, and then return the size for the first valid one. It would be useful to also return the image type, so this can be used by the caller.Why
To validate the image is the expected file format, or to just determine the file format.