read Pixels
Copies Rect of pixels from Image to Bitmap. Copy starts at offset (srcX, srcY), and does not exceed Image (getWidth(), getHeight()).
dst specifies width, height, ColorType, AlphaType, and ColorSpace of destination.
Returns true if pixels are copied. Returns false if:
dst has no pixels allocated.
Pixels are copied only if pixel conversion is possible. If Image ColorType is ColorType.GRAY_8, or ColorType.ALPHA_8; dst.getColorType() must match. If Image ColorType is ColorType.GRAY_8, dst.getColorSpace() must match. If Image AlphaType is AlphaType.OPAQUE, dst.getAlphaType() must match. If Image ColorSpace is null, dst.getColorSpace() must match. Returns false if pixel conversion is not possible.
srcX and srcY may be negative to copy only top or left of source. Returns false if getWidth() or getHeight() is zero or negative.
Returns false if abs(srcX) >= Image.getWidth(), or if abs(srcY) >= Image.getHeight().
If cache is true, pixels may be retained locally, otherwise pixels are not added to the local cache.
Return
true if pixels are copied to dstPixels
Parameters
the DirectContext in play, if it exists
destination bitmap
column index whose absolute value is less than getWidth()
row index whose absolute value is less than getHeight()
whether the pixels should be cached locally