Save figure as jpg with 600dpi

12 次查看(过去 30 天)
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' ?
  5 个评论
DGM
DGM 2024-11-10
There is no '-djpg' device option. The option for JPG is '-djpeg'.
Walter Roberson
Walter Roberson 2024-11-10
The "-d" prefix stands for "device". The output is to be sent to the JPG "device"

请先登录,再进行评论。

更多回答(1 个)

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

类别

Help CenterFile Exchange 中查找有关 Environment and Settings 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by