FUNCTION rev_true_image, image ; reform a true-color image of (m x n x 3) to (3 x m x n), conforming to write_png sz=size(image,/dim) if sz[2] eq 3 then begin r=image[*,*,0] g=image[*,*,1] b=image[*,*,2] im=bytarr(3,sz[0],sz[1]) im[0,*,*]=r im[1,*,*]=g im[2,*,*]=b return,im endif else begin print,'nothing done, as the image dimension does not match.' return,0 endelse END