How to get rid of black background when displaying an image

2 ビュー (過去 30 日間)
Carlos
Carlos 2014 年 7 月 31 日
回答済み: Image Analyst 2014 年 7 月 31 日
Hi,
I am displaying an image in my GUI using the commands
A = imread('filename.png') imshow(A)
When the image displays it always has a black background (not the background of the figure). When I open the image in an image viewer it is transparent. Is there a way to make this black background of the image become transparent so behind the image is the color of the figure window. Is this possible?
Thank you

回答 (1 件)

Image Analyst
Image Analyst 2014 年 7 月 31 日
You're probably seeing the background color of the axes control. I haven't tried it but I'd probably see if you can make the color of the axes control be the same as the figure color.

カテゴリ

Help Center および File ExchangeColormaps についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by