On this tip I always found opencv to work way way faster just dropping the color depth of whatever image as such