decode Region
Decode a region of the image with the given sample size. This method is called off the UI thread so it can safely load the image on the current thread. It is called from an running in a single threaded executor, and while a synchronization lock is held on this object, so will never be called concurrently even if the decoder implementation supports it.
Return
The decoded region. It is safe to return null if decoding fails.
Parameters
s Rect
Source image rectangle to decode.
sample Size
Sample size.