altmany / altmany/export_fig

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

Offen
#123 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
MATLAB
Sterne
1.4k
Forks
366
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.