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
0 个评论
回答(1 个)
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
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 Center 和 File Exchange 中查找有关 Printing and Saving 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!