Doing collision based on RGB is URK! Each entity should have world coordinates and from those world coordinates you can work out exactly which tile (or even which pixel of which tile) they're stood on and where to draw 'em relative to the "camera's" position.
If you really need to know which particular pixels in a tile can be collided with (rather than just the whole tile) then maintain a counterpart array for each tile and write the collision mask to it. You won't have the time overhead associated with reading pixels and the tile won't have to be on-screen to be read for collisions if you refer to the array instead.
If you really need to know which particular pixels in a tile can be collided with (rather than just the whole tile) then maintain a counterpart array for each tile and write the collision mask to it. You won't have the time overhead associated with reading pixels and the tile won't have to be on-screen to be read for collisions if you refer to the array instead.