auto GetWriteToOutputStage(const ImageOutput& main_output, size_t width, size_t height, bool has_alpha, bool unpremul_alpha, size_t alpha_c, jxl::Orientation undo_orientation, std::vector<ImageOutput>& extra_output) -> std::unique_ptr<RenderPipelineStage>