フィルターのクリア

Saving Matlab figure(Imagesc) to JPG without White borders

12 ビュー (過去 30 日間)
Sunny
Sunny 2018 年 12 月 20 日
コメント済み: Image Analyst 2021 年 3 月 16 日
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
  3 件のコメント
Elinor Kath
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
Image Analyst 2021 年 3 月 16 日
You can ignore the warning. Is white not OK? Why are you having transparent pixels anyway?

サインインしてコメントする。

採用された回答

Mark Sherstan
Mark Sherstan 2018 年 12 月 20 日
Look at this file
  1 件のコメント
Sunny
Sunny 2018 年 12 月 20 日
This works great. Thanks.

サインインしてコメントする。

その他の回答 (1 件)

Image Analyst
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 件のコメント
Sunny
Sunny 2018 年 12 月 20 日
編集済み: Sunny 2018 年 12 月 20 日
Thanks got your point. I will save in PNG.

サインインしてコメントする。

製品


リリース

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by