Path: news.mathworks.com!not-for-mail
From: "shopana " <shopana.e@hcl.in>
Newsgroups: comp.soft-sys.matlab
Subject: image load
Date: Fri, 1 Feb 2008 08:47:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 13
Message-ID: <fnuma5$12m$1@fred.mathworks.com>
Reply-To: "shopana " <shopana.e@hcl.in>
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 1201855621 1110 172.30.248.37 (1 Feb 2008 08:47:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 1 Feb 2008 08:47:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1166498
Xref: news.mathworks.com comp.soft-sys.matlab:448721


hi,
 i want to display image on the push button . i tried with 
imread but getting the error message.I have mentioned the 
code below.
[a,map]=imread('open_icon.jpg');
 [r,c,d]=size(a); 
 x=ceil(r/30); 
 y=ceil(c/30); 
 g=a(1:x:end,1:y:end,:);
 g(g==255)=5.5*255;
 set(handles.directory,'CData',g);
Is my code is right? how can i do that? can someone help 
me?