perhaps an idea for a small optimization; in my ‘pixel perfect collision detection’ when I create a sprite or bob frame I create an array of booleans by inspecting the pixels. I do that only once at game startup. Then when doing the collision detections, I simply check the pre-generated boolean arrays if two overlapping pixels both hold the value true. Call it a collision mask if you will. These arrays only use up bytes, it won’t even make a small dent on the memory footprint of the game.
Of course that does require a little calculating to figure out which regions of the arrays are actually overlapping, but you are doing something similar when you are copying the pixels over to the arrays you use to do the comparison.