I want to save a frame as an image in png format with saveas command. Although my image's size is 640X480 (gcf), the saved images size is 1201x901 and spaces white color.(like a bold white border).So I want the image to be saved 640x480. I tried transparent background but it didn't work. How can I fix this problem?
F(j) = getframe(gcf);
fname='C:\...'
saveas(gcf, fullfile(fname, 'newImage'), 'png');