Saving Matlab figure(Imagesc) to JPG without White borders
16 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Elinor Kath
le 16 Mar 2021
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
le 16 Mar 2021
You can ignore the warning. Is white not OK? Why are you having transparent pixels anyway?
Réponse acceptée
Plus de réponses (1)
Image Analyst
le 20 Déc 2018
Yes, use imwrite:
imwrite(Subject_Assist_Quest, filename);
Do not save image analysis images as JPG or you'll be sorry. Use PNG.
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!