Path: news.mathworks.com!not-for-mail
From: "Shanmugam Kannappan" <shanmugambe@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Saving a overlay and image figure
Date: Tue, 9 Sep 2008 05:10:20 +0000 (UTC)
Organization: NFIndia
Lines: 37
Message-ID: <ga50fs$85o$1@fred.mathworks.com>
References: <ga1fvr$4em$1@fred.mathworks.com>
Reply-To: "Shanmugam Kannappan" <shanmugambe@gmail.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1220937020 8376 172.30.248.37 (9 Sep 2008 05:10:20 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 9 Sep 2008 05:10:20 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1441885
Xref: news.mathworks.com comp.soft-sys.matlab:489312



Hello Sir,
getimage command will not work out for getting the content of the figure window.

I suggest that u can use getframe command.The example code as below.

imshow('pout.tif')
hold on
plot(1:260,150)
s=getframe;
figure
imshow(s.cdata)

Regards

Shanmugam.K

"Nicholas Beser" <nick.beser@jhuapl.edu> wrote in message <ga1fvr$4em$1@fred.mathworks.com>...
> I was able to create a very large image with a line overlay in MATLAB 2008a. I tried to use getimage to retrieve the combination of image and line overlay, however the function only returned the image (no line art). 
> 
> Here is the code fragment:
> h=imshow(imgtest,'XData',XData,'YData',YData);title(frmstr1);
> hold on
> for k=2:frmcnt
>     xl=[pointlist(1,k-1) pointlist(1,k)];
>     yl=[pointlist(2,k-1) pointlist(2,k)];
>     plot(xl,yl,'Color','b');
> end
> Anewimg=getimage(h);
> hold off
> 
> Is there some other function that I should use to save the entire figure to a graphics file (such as PNG or JPG)? While I can manually save the figure as a jpg, it is not saved at the full resolution, only at display resolution. Since the display is at 17%, that is not sufficient.
> 
> Thank-you,
> 
> Nick Beser
> nick.beser@jhuapl.edu