Save figure as jpg with 600dpi

24 visualizaciones (últimos 30 días)
Nikolas Spiliopoulos
Nikolas Spiliopoulos el 4 de Sept. de 2019
Comentada: Walter Roberson el 10 de Nov. de 2024
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 comentario
Jan
Jan el 4 de Sept. de 2019
Whenever you mention an error in the forum, post a copy of the complete message.

Iniciar sesión para comentar.

Respuesta aceptada

Jan
Jan el 4 de Sept. de 2019
Editada: Jan el 4 de Sept. de 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' ?
  5 comentarios
DGM
DGM el 10 de Nov. de 2024
There is no '-djpg' device option. The option for JPG is '-djpeg'.
Walter Roberson
Walter Roberson el 10 de Nov. de 2024
The "-d" prefix stands for "device". The output is to be sent to the JPG "device"

Iniciar sesión para comentar.

Más respuestas (1)

Fabio Freschi
Fabio Freschi el 4 de Sept. de 2019
In print command, for jpg images, the flag is '-djpeg'

Categorías

Más información sobre App Building en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by