JPEG is a common image format.
IM(:,:,1) = red data;
IM(:,:,2) = green data;
IM(:,:,3) = blue data;
imwrite ( IM, 'file.jpg', 'JPG' )
.
[ X, map ] = capture ( figure_handle );
imwrite ( X, map, 'file.jpg', 'JPG' )
.
fig2dev -L jpeg input.fig > output.jpg
You can go up one level to the DATA page.