Saving Matlab figure(Imagesc) to JPG without White borders

103 views (last 30 days)
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 Comments
Image Analyst
Image Analyst on 16 Mar 2021
You can ignore the warning. Is white not OK? Why are you having transparent pixels anyway?

Sign in to comment.

Accepted Answer

Mark Sherstan
Mark Sherstan on 20 Dec 2018
Look at this file

More Answers (1)

Image Analyst
Image Analyst on 20 Dec 2018
Yes, use imwrite:
imwrite(Subject_Assist_Quest, filename);
Do not save image analysis images as JPG or you'll be sorry. Use PNG.
  1 Comment
Sunny
Sunny on 20 Dec 2018
Edited: Sunny on 20 Dec 2018
Thanks got your point. I will save in PNG.

Sign in to comment.

Categories

Find more on Images in Help Center and File Exchange

Products


Release

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by