Why does imread read the alpha channel, but not the image itself?
Ältere Kommentare anzeigen
Hi all,
I would like to read a png with transparent background in MATLAB (2014b, Windows 7) using imread:
[icon, map, alpha] = imread('icon.png');
However, icon is now only zeros, but the alpha channel is read correctly (the map is empty as well). I made the png with Photoshop and I tried several options, such as making the image indexed, RGB, grayscale, 8 bits, 32 bits, et cetera.
Does anyone have an idea about why my alpha channel is read correctly, but the image data is black? How should I save the image from Photoshop such that it is read in MATLAB? Thanks in advance!
Kind regards, Mark
Akzeptierte Antwort
Weitere Antworten (1)
Raphael
am 6 Apr. 2018
Bearbeitet: Walter Roberson
am 7 Apr. 2018
1 Stimme
1 Kommentar
Walter Roberson
am 7 Apr. 2018
Notice, though, that "icon is now only zeros", so something else was going wrong for the user.
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!
