savepng

savepng is a fast PNG image compression routine that outperforms MatLab's built-in imwrite
855 Downloads
Aktualisiert 26. Nov 2016

savepng is a very efficient PNG image compression MEX-routine that outperforms MatLab's built-in imwrite in compression times and produced file sizes. For a typical figure size at the default compression level, savepng is ~5.8 times faster, with file size only 17% bigger than imwrite. At the highest compression level, savepng is still ~2.8 times faster, with produced file sizes 15% smaller.
PNG encoding is based on public-domain MINIZ library.
Usage
savepng(CDATA,filename[,Compression])

Where,

* CDATA -- is a standard MatLab image m-by-n-by-3 matrix. This matrix can be obtained using getframe command or, for a faster implementation, undocumented hardcopy command
* filename -- file name of the image to write. Don't forget to add .png to the file name.
* Compression -- Optional input argument. This argument takes on a number between 0 and 10 controlling the amount of compression to try to achieve with PNG file. 0 implies no compresson, fastest option. 10 implies the most amount of compression, slowest option. Default value is 4.

Up-to-date version, a more detailed help, bugs/issues tracking can all be found here:
https://github.com/stefslon/savepng

Zitieren als

Stefan Slonevskiy (2024). savepng (https://github.com/stefslon/savepng), GitHub. Abgerufen .

Kompatibilität der MATLAB-Version
Erstellt mit R2011b
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Denoising and Compression finden Sie in Help Center und MATLAB Answers

Community Treasure Hunt

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

Start Hunting!

Versionen, die den GitHub-Standardzweig verwenden, können nicht heruntergeladen werden

Version Veröffentlicht Versionshinweise
1.1.0.0

Added support for alpha channel
- fixed compiler errors, updated to latest miniz library, linked to GitHub

1.0.0.0

Um Probleme in diesem GitHub Add-On anzuzeigen oder zu melden, besuchen Sie das GitHub Repository.
Um Probleme in diesem GitHub Add-On anzuzeigen oder zu melden, besuchen Sie das GitHub Repository.