I would like to read images from InputStreams, and draw them to my canvas. Unfortunately, the images may be very large, and could easily cause out of memory exceptions. BitmapFactory allows me to provide a sample size value, which will down sample the image as it is processed and avoid the memory issues. However, image quality suffers.
Ideally, canvas would provide a paint image method which can paint from an InputStream, as opposed to from a Bitmap, but I haven’t found anything of this type. Does this exist, or is there any other way to safely render arbitrarily large images from InputStreams without down sampling?
The answer appears to be: no, there isn’t.