altmany / altmany/export_fig

Images drawn by imagesc with background transparency lose bg transparency on export

Aperta
#123 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
MATLAB
Stelle
1.4k
Fork
366
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

A sort of minimum working example,

``` Matlab
I = imread('file.jpg');
alpha = I(:,:,1) > 235 & I(:,:,2) > 235 & I(:,:,3) > 235; %white->transparent
pic = imagesc(I);
pic.AlphaData = ~alpha;
export_fig(fig,output,'-nocrop','-transparent')
```

The result will have the original white background, rather than the transparent background hacked by setting the alphadata property.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.