gallery to output