Android: Extracting tiles from a tileset programatically?
<p>How do I programatically extract tiles from a tileset such as this one: <a href="http://opengameart.org/sites/default/files/grassland_tiles.png" rel="nofollow">http://opengameart.org/sites/default/files/grassland_tiles.png</a></p>

<p>I want to use these tiles in my game. I see that some tiles here are of different sizes (or maybe all tiles are a multiple of some fixed size). For example, if I want to use one of the tree tiles in my program, how can I figure out what offset into the tileset image I must use, and how big of a sub-image i must extract? I don't see any metadata associated with any of these tilesets that I can use.</p>

<p>Also, is there an Android API I can use to extract a part of an image from a bigger image?</p>

<p>Thanks!</p>
