Path: news.mathworks.com!not-for-mail
From: "Ian Clarkson" <ian.clarkson@gesturetek.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: image load
Date: Fri, 1 Feb 2008 14:26:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 21
Message-ID: <fnva5p$4pb$1@fred.mathworks.com>
References: <fnuma5$12m$1@fred.mathworks.com>
Reply-To: "Ian Clarkson" <ian.clarkson@gesturetek.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 1201875961 4907 172.30.248.37 (1 Feb 2008 14:26:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 1 Feb 2008 14:26:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1215962
Xref: news.mathworks.com comp.soft-sys.matlab:448761


"shopana " <shopana.e@hcl.in> wrote in message 
<fnuma5$12m$1@fred.mathworks.com>...
> 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?

you're going to have to let us know exactly what error 
message you're receiving. and are you trying to disply the 
image ON the pushbutton? or just display an image somewhere 
when you press a pushbutton?