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:
imread and image

Subject: imread and image

From: Wes

Date: 26 Aug, 2010 20:11:21

Message: 1 of 4

I saved a matlab figure as bmp file, using "saveas". When I open its bmp file with MS Office Picture Manager, its background is white. But when I imported its bmp file back to Matlab with "imread" and plotted it with "image", its background is now in red. How can I resolve this?

Subject: imread and image

From: Patrick Mineault

Date: 26 Aug, 2010 20:45:33

Message: 2 of 4

"Wes" <wspark77@hotmail.com> wrote in message <i56hp9$lfu$1@fred.mathworks.com>...
> I saved a matlab figure as bmp file, using "saveas". When I open its bmp file with MS Office Picture Manager, its background is white. But when I imported its bmp file back to Matlab with "imread" and plotted it with "image", its background is now in red. How can I resolve this?

Have you tried saving as a .png instead?

Subject: imread and image

From: Sean

Date: 26 Aug, 2010 20:47:20

Message: 3 of 4

"Wes" <wspark77@hotmail.com> wrote in message <i56hp9$lfu$1@fred.mathworks.com>...
> I saved a matlab figure as bmp file, using "saveas". When I open its bmp file with MS Office Picture Manager, its background is white. But when I imported its bmp file back to Matlab with "imread" and plotted it with "image", its background is now in red. How can I resolve this?

Try imwrite instead of saveas

Subject: imread and image

From: Wes

Date: 30 Aug, 2010 14:56:04

Message: 4 of 4

"Sean " <sean.dewolski@nospamplease.umit.maine.edu> wrote in message <i56jso$8al$1@fred.mathworks.com>...
> "Wes" <wspark77@hotmail.com> wrote in message <i56hp9$lfu$1@fred.mathworks.com>...
> > I saved a matlab figure as bmp file, using "saveas". When I open its bmp file with MS Office Picture Manager, its background is white. But when I imported its bmp file back to Matlab with "imread" and plotted it with "image", its background is now in red. How can I resolve this?
>
> Try imwrite instead of saveas

tiff files that I save using "saveas" worked without any background color problem. Thanks

Tags for 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