What I want to do is draw a cutout of the image on the screen, in my choice.
I can easily load this into a bitmap. and then draw a subsection.
But when the image is large, it will obviously run out of memory.
My screen is a surface view. So there is canvas, etc.
So, how can I draw part of the image with a given offset and resize. Without loading the original into memory
I found an answer that looked at the correct lines, but it does not work properly. Using drawables from a file. The following is sample code. Besides the random sizes that it produces, it is also incomplete.
Example:

Drawable img = Drawable.createFromPath(Files.SDCARD + image.rasterName); int drawWidth = (int) (image.GetOSXWidth()/(maxX - minX)) * m_canvas.getWidth(); int drawHeight = (int)(image.GetOSYHeight()/(maxY - minY)) * m_canvas.getHeight();
source share