I have saved png file with imwrite like:
================================
>>[t,map,alpha]=imread('test.png');
....
>>imwrite(t,'test.png','Alpha',alpha);
================================
It worked fine. however, if the alpha is not assigned by reading from
an exsited png file,
there will be some problems.
tArea is the area I need to save.
alpha is a matrix with the same size as tArea
================================
alpha = zeros(size(tArea));
alpha(tArea~=0) = 1;
imwrite(tArea,'tArea.png','Alpha',alpha); % the saved image is totally
blank
================================
How can I fix it?
|
|
0
|
|
|
|
Reply
|
xenoszh (14)
|
3/6/2010 9:15:23 AM |
|