Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
image load

Subject: image load

From: shopana

Date: 1 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: image load

From: Ian Clarkson

Date: 1 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: image load

From: Vihang Patil

Date: 1 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

No tags are associated with this thread.

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.

Contact us