Saving Matlab figure(Imagesc) to JPG without White borders
古いコメントを表示
Hi,
I am using imagesc to plot color maps in matlab. While saving as JPG and Figuire it gives white space around the image. Is it possible to save without white space?
imagesc(Subject_Assist_Quest);
set(gca,'YDir','normal')
axis off

3 件のコメント
Gyaneshwar dubacharla
2020 年 8 月 9 日
Use this command from MATLAB - exportgraphics(gca,fname,'BackgroundColor','none')
Elinor Kath
2021 年 3 月 16 日
When I try this I get: "Warning: Background transparency is not supported; using white instead. " So far I haven't found a workaround.
Image Analyst
2021 年 3 月 16 日
You can ignore the warning. Is white not OK? Why are you having transparent pixels anyway?
採用された回答
その他の回答 (1 件)
Image Analyst
2018 年 12 月 20 日
Yes, use imwrite:
imwrite(Subject_Assist_Quest, filename);
Do not save image analysis images as JPG or you'll be sorry. Use PNG.
1 件のコメント
カテゴリ
ヘルプ センター および File Exchange で Images についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!