Save figure as jpg with 600dpi

조회 수: 43 (최근 30일)
Nikolas Spiliopoulos
Nikolas Spiliopoulos 2019년 9월 4일
댓글: Nikolas Spiliopoulos 2019년 9월 4일
Hi all,
I am trying to save some figures through coding, in jpg format and 600dpi.
Hovewer I have tried these, but still getting error (Matlab version 2019a)
saveas('figure.jpg')
print(gcf,'figure.jpg','-jpg','-r600');
thanks in advance
  댓글 수: 1
Jan
Jan 2019년 9월 4일
Whenever you mention an error in the forum, post a copy of the complete message.

댓글을 달려면 로그인하십시오.

채택된 답변

Jan
Jan 2019년 9월 4일
편집: Jan 2019년 9월 4일
saveas('figure.jpg')
The first input must be the handle of a figure.
print(gcf, 'figure.jpg', '-jpg', '-r600');
There is no '-jpeg' option for the print command. Do you mean '-djpeg' ?
  댓글 수: 3
Jan
Jan 2019년 9월 4일
Okay. And with '-djpeg' ?
Nikolas Spiliopoulos
Nikolas Spiliopoulos 2019년 9월 4일
with -djpeg it's working, just wondering if there is any option for jpg

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Fabio Freschi
Fabio Freschi 2019년 9월 4일
In print command, for jpg images, the flag is '-djpeg'

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by