True. If you have the large image already decoded, calling

     canvas.drawBitmap(bitmap, srcRect, dstRect, paint);

allows you to draw just a section of it (specified by srcRect). The  
above call does all the clipping etc. for you (and more efficiently  
than if you did the clipping yourself).

On Sep 30, 2008, at 10:07 PM, Steve Oldmeadow wrote:


If I understand your question correctly you just want:

Bitmap.createBitmap(Bitmap source, int x, int y, int width, int
height)

where source will be your 1500x1500 bitmap, x and y are the top left
of the sub image and width and height are the width and height of the
sub image.

Memory could be an issue though particularly if you are going to keep
a lot of sub images in memory.  Don't forget that you can draw sub
sections of an image to a canvas using clipping so maybe you don't
need to create a new sub image.




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to