Skip to Main Content Skip to Search
Login
File Exchange
MATLAB Newsgroup
Link Exchange
  Blogs  
 Contest 
MathWorks.com

Thread Subject: image load

Subject: image load

From: shopana

Date: 01 Feb, 2008 08:47:01

Message: 1 of 3

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?

Subject: Re: image load

From: Ian Clarkson

Date: 01 Feb, 2008 14:26:01

Message: 2 of 3

"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?

Subject: Re: image load

From: Vihang Patil

Date: 01 Feb, 2008 14:49:01

Message: 3 of 3

"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?


This might be helpful
http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=2378&objectType=file

Vihang

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

envelope graphic E-mail this page to a colleague

Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.
Related Topics