The code was refactored moving the BlenderHelper class from "render" to "doc", and now doc::blend_image() supports blending different color modes. Some work is still needed to work with grayscale images correctly.