Save figure as jpg with 600dpi

16 ビュー (過去 30 日間)
Nikolas Spiliopoulos
Nikolas Spiliopoulos 2019 年 9 月 4 日
コメント済み: Walter Roberson 2024 年 11 月 10 日
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 Center および File ExchangeEnvironment and Settings についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by