Save figure as jpg with 600dpi

43 visualizzazioni (ultimi 30 giorni)
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 Commento
Jan
Jan il 4 Set 2019
Whenever you mention an error in the forum, post a copy of the complete message.

Accedi per commentare.

Risposta accettata

Jan
Jan il 4 Set 2019
Modificato: Jan il 4 Set 2019
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 Commenti
Jan
Jan il 4 Set 2019
Okay. And with '-djpeg' ?
Nikolas Spiliopoulos
Nikolas Spiliopoulos il 4 Set 2019
with -djpeg it's working, just wondering if there is any option for jpg

Accedi per commentare.

Più risposte (1)

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

Categorie

Scopri di più su Migrate GUIDE Apps in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by