I am writing a game which uses a tile system as a map, these tiles are all 235x256 pixels so are easy to display in a grid system. The tiles are stored as PNGs and for some of the tiles, most of the pixels are transparent.
Is there a way to create a rect object around the part of the tile that has non-transparent pixels? This would be used as a collision_block which would be used in the game to determine if the player is colliding with a map block.