MATLAB: Saving Figure using saveas() function

faceface detectionfigfiguregcfImage Processing Toolboxsaveas

The link shows a picture, but it does not clear the difference of what you get and waht you want.

Best Answer

The function export_fig (available on the File Exchange) will automatically crop the image for you. It will not change the background colour, nor will it resize the figure. It will save to jpeg with low compression/high quality by default.
Download it then try:
export_fig(gcf, 'pred_prey.jpg');