Saving image with high resolution

11 次查看(过去 30 天)
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

回答(1 个)

Elias G
Elias G 2024-8-17
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 个评论
DGM
DGM 2024-8-18
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.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Printing and Saving 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by