I'm lazy, so here is the way I'd tackle this issue: it would be by coupling the graphics with a collision/physics engine. You could try and find a basic collision engine for your language and implement something like this for your collisions and graphics:
The image is composed with square sprites images; here is the colour coding (note that the first row, and the arrows, are just to illustrate what the original sprites look like):
- Yellow: the edge of the sprite (square quad)
- Red: collision box or collision circle
- Blue: mix of Yellow and Red -> the sprite and the object collision rectangle match
So for each sprite, you also need to create a set of collision circles and collision boxes that are moved (transformed) around the same way your sprites are.
The rest depends on your implementation and the implementation of the collision engine you'll use. This will not give you pixel perfect collision, but it's a basis for more complex physics simulation.
All tiles except "Xerathul's Revenge" tiles have been drawn by David E. Gervais, and are published under the Creative Commons licence. You are free to to copy, distribute and transmit those tiles as long as you credit David Gervais as their creator. (Original site).