java-2d

per-pixel collision using getRGB of a BufferedImage (Java2D Api)

Hello I'm currently working on a 2D platformer game. I would like to have per-pixel collisions between my player (a Rectangle) and a freeform terrain (uses slopes, a BufferedImage). I am a bit confused on the concept to check if any part of my rectangle collides with the terrain. Currently I'm trying to see if a part of my terrain cont...