Why does imread read the alpha channel, but not the image itself?
Mostra commenti meno recenti
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
Risposta accettata
Più risposte (1)
Raphael
il 6 Apr 2018
Modificato: Walter Roberson
il 7 Apr 2018
1 voto
1 Commento
Walter Roberson
il 7 Apr 2018
Notice, though, that "icon is now only zeros", so something else was going wrong for the user.
Categorie
Scopri di più su Image Processing Toolbox in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
