Saving Matlab figure(Imagesc) to JPG without White borders
12 ビュー (過去 30 日間)
古いコメントを表示
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
![Capture.jpg](https://www.mathworks.com/matlabcentral/answers/uploaded_files/199508/Capture.jpeg)
3 件のコメント
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.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!