Path: news.mathworks.com!not-for-mail
From: "Abbas Cheddad" <cheddad10NOSPAM@yahoo.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: image file
Date: Tue, 13 Sep 2011 11:19:11 +0000 (UTC)
Organization: Ume&#229; University
Lines: 26
Message-ID: <j4ne7f$aog$1@newscl01ah.mathworks.com>
References: <j4m0a4$5ni$1@newscl01ah.mathworks.com>
Reply-To: "Abbas Cheddad" <cheddad10NOSPAM@yahoo.com>
NNTP-Posting-Host: www-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1315912751 11024 172.30.248.48 (13 Sep 2011 11:19:11 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 13 Sep 2011 11:19:11 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1084718
Xref: news.mathworks.com comp.soft-sys.matlab:743046

Hi Susan,

Try this:

%%%%%%%%%%%%%%%%%%%%%%%%%%
imshow(Image)
Frame=getframe();
Im=Frame.cdata;
imwrite(im,'Name_it.png');

% Note 1: remember the grabbed image (Im) is an RGB even when your original 
% displayed image (Image) is grayscale!

% Note 2: the grabbed image size depends on the display option you choose

% Note 3: the image (Im) is grabbed as it is within the display gray box.

%%%%%%%%%%%%%%%%%%%%%%%%%%%


"Susan" wrote in message <j4m0a4$5ni$1@newscl01ah.mathworks.com>...
> Hey all, 
> Is there a way to save the figure output produced in matlab file as image (gif,ping)?
> 
> Thanks all,
>  Susan