ExportPngInkscape(f​ilename,dpi,handle)

버전 1.1.0.0 (1.81 KB) 작성자: Alessandro Masullo
Save figures in high quality PNG by saving them in SVG and exporting in PNG using Inkscape
다운로드 수: 396
업데이트 날짜: 2016/6/30

라이선스 보기

Matlab function for exporting figures in PNG is terrible. There is no anti-alias (although something better has been tried with the new graphic engine) and even increasing the exported file resolution, images still look horrible.
The best solution that I've found for exporting images in a nice way is saving them in SVG and exporting them to PNG using Inkscape, but this requires a lot of time. For this reason, I coded this very basic routine that takes care of everything: first, the image is saved in a vectorial format (SVG) using "print", then Inkscape is invoked through command line to export the SVG file in a PNG with the desired resolution.
This function uses Matlab internal SVG printer, which has been introduced since R2014a. If you have a previous Matlab version you may want to use the following script from the File exchange to export images to SVG:
http://www.mathworks.com/matlabcentral/fileexchange/7401-scalable-vector-graphics--svg--export-of-figures

인용 양식

Alessandro Masullo (2024). ExportPngInkscape(filename,dpi,handle) (https://www.mathworks.com/matlabcentral/fileexchange/54300-exportpnginkscape-filename-dpi-handle), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2014a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Printing and Saving에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.1.0.0

Export in PDF rather than SVG, before exporting in PNG
Fixed figure transparency

1.0.0.0

Updated description

Title updated