Adding a pixelOpacity method to help generic handling of transparent pixels.