Azzera filtri
Azzera filtri

Saving image with high resolution

9 visualizzazioni (ultimi 30 giorni)
hamza hamza
hamza hamza il 11 Giu 2015
Modificato: Walter Roberson il 18 Ago 2024 alle 4:21
Hi, I use this line of code to save my figure as .png : print(name,'-dpng','-r0'), but i get a bad resolution picture bespite that the figure in matlab is good. I tried print(name,'-dpng','-r500'), but nothing changed. How can i save figure as .png but with the same quality as the matlab figure? Thank you

Risposte (1)

Elias G
Elias G il 17 Ago 2024 alle 23:35
Hello, I recently tried to save a figure but always got a square resolution.
Finally, after maximising my own figure and saving it, the results were good.
fg = gcf;
fg.WindowState='maximized';
print(fg, myfolder_name,'-djpeg','-r0');
If you want something of higher quality, where you can zoom in without losing resolution,
you should use .eps or .svg, depending on the situation.
  1 Commento
DGM
DGM il 18 Ago 2024 alle 0:55
If you want to use vector output, know that not all objects will be embedded in vector form. There may still be raster content.
If full raster output is okay and quality is ever any concern, then JPG is counterproductive. You're automatically throwing away at least 75% of the chroma information in the image, and in many (if not most) cases, the file size is actually larger than a PNG.

Accedi per commentare.

Categorie

Scopri di più su Images in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by