The SDK only said the null will returned if the image data could not be decoded.
but what if i want more details? is the failure cause by an absence of the specified file, or by an IOException or just by an illegal image format?
hope for your answers, thanks.
The SDK only said the null will returned if the image data could not
Share
You can first check if the file exists by using
File.exists()method. Then ifdecodeFilereturnsnullit would mean the file exists but something went wrong during decoding. There’s probably no need to have more details at that stage it would all mean ‘the decoding engine couldn’t decode an existing file’. The exact reason would depend on the engine implementation and thus is of no interest to the user.