alpha and cdata ?

after adding some color to one image , When I import it through MATLAB , I found that it splits to two part , these parts are alpha and cdata , can you tell me why it became in two parts ?
the surprise here when i choose to access alpha only without cdata , i got fully blank white image .
thank you .

4 Comments

Adam
Adam on 7 Sep 2016
You need to give an example and preferably the data in question. Data will be stored in file in whatever channel you tell it to be wherever you do the editing and Matlab will just load this in as it is in file.
Still waiting for some answer
Steven Lord
Steven Lord on 7 Sep 2016
Be patient! It's just after 9 AM here on the east coast of the United States; when you posted, most of the regular readers were in bed or maybe just woke up and hadn't had their coffee yet.
Manu Goyal
Manu Goyal on 9 Jan 2017
Can you elaborate how you add the color in your image?

Sign in to comment.

Answers (1)

Steven Lord
Steven Lord on 7 Sep 2016

0 votes

Search in the MATLAB documentation for the word "transparency". In the online documentation for the most recent release, one page that discusses transparency is this one.
If you're using imread to read in your data, the third output contains the information about the transparency of your image while the first two outputs are related to the colors of your image. If you display just the first two outputs, you'll see the color of your image but not the transparency; if you display just the third, all you're showing is the transparency data and that won't generally look much like your image.

Asked:

on 7 Sep 2016

Commented:

on 9 Jan 2017

Community Treasure Hunt

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

Start Hunting!