PNGwriter is a C++ library for creating PNG images.
PNGwriter is a very easy to use open source graphics library that uses PNG as its output format. The interface has been designed to be as simple and intuitive as possible. It supports plotting and reading pixels in the RGB (red, green, blue), HSV (hue, saturation, value/brightness) and CMYK (cyan, magenta, yellow, black) colour spaces, basic shapes, scaling, bilinear interpolation, full TrueType antialiased and rotated text support, bezier curves, opening existing PNG images and more. Documentation in English (and Spanish up to v0.5.4). Runs under Linux, Unix, Mac OS X and Windows. Requires libpng and optionally FreeType2 for the text support.
Warning: PNGwriter was never designed for reading untrusted files with it. Do NOT use this in sensitive environments, especially DO NOT read PNGs from unknown sources with it!
The PNGwriter project's online presence consists of:
- The PNGwriter website, with a
- FAQ, quickstart, examples, and an online copy of the manual.
- This PNGwriter GitHub repo, where source code is distributed and collaboration takes place. The distribution includes a PDF copy of the manual.
This project was migrated from the PNGwriter repository originally hosted on SourceForge (and no longer maintained). The last version released on SourceForge was 0.5.5.
We'd love to hear how you've used PNGwriter in your project. Are you doing interesting things? Are you running it on interesting hardware? Tell us how you use PNGwriter. Open an issue and let us know. Don't forget to include the following information:
- Project Title
- Link
- Cool image
- Authors list
- Single-sentence, one-line description of the project.
Spack:
spack install pngwriter
spack load pngwriter
From Source:
First install the dependencies zlib, libpng and (optional for text support) freetype. PNGwriter can then be installed using CMake:
git clone https://github.com/pngwriter/pngwriter.git
mkdir -p pngwriter-build
cd pngwriter-build
# for own install prefix append: -DCMAKE_INSTALL_PREFIX=$HOME/somepath
cmake ../pngwriter
make -j
# optional
make test
# sudo is only required for system paths
sudo make install
First set the following environment hint if PNGwriter was not installed in a system path:
# optional: only needed if installed outside of system paths
export CMAKE_PREFIX_PATH=$HOME/somepath:$CMAKE_PREFIX_PATH
Use the following lines in your projects CMakeLists.txt
:
find_package(PNGwriter 0.7.0)
if(PNGwriter_FOUND)
target_link_libraries(YourTarget PRIVATE PNGwriter::PNGwriter)
endif(PNGwriter_FOUND)
This software is released under GPLv2+.
See the CHANGELOG.md. Please note that changes to PNGwriter prior to version 0.5.5 can be found in the doc/CHANGES file.