ImageDecoder::size()
frame()
Reordering these calls allow us to ensure that all encoders are able to return the size of the image before they are requested to decode the whole bitmap.
TestEnvironment