How can I add transparency to an image displayed in App Designer UIAxes?
Ältere Kommentare anzeigen
I am using imread for a png image. Since AlphaData is not a property of UIAxes, I cannot use
set(h, 'AlphaData', alpha_data);
Is there any other way to add alpha values to UIAxes?
2 Kommentare
koray beyaz
am 10 Okt. 2017
DGM
am 17 Nov. 2023
It's not clear whether this was relevant, but:
That covers uiimage() objects in a uifigure, image() objects, and direct compositing approaches.
Antworten (2)
Paul Huxel
am 6 Jan. 2020
AlphaData will be a property of the image that is the child of the UIAxes. It can then be set as follows:
app.UIAxes = uiaxes(uifigure); % spoof App Designer UIAxes (for demonstration)
[im,map,alpha] = imread("https://upload.wikimedia.org/wikipedia/commons/2/21/Matlab_Logo.png");
imshow(im,'Parent',app.UIAxes)
set(app.UIAxes.Children,'AlphaData',alpha)
Image Analyst
am 17 Nov. 2023
0 Stimmen
Kategorien
Mehr zu Image Processing Toolbox finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!