A C++ library for creating PNG images.. #Png writer #Png library #C++ library #C++ #Library #Writer
PNGwriter is a C++ library for creating PNG images. PNGwriter lets you focus on your program, and saves you the trouble of learning how to create, use and read PNG images from scratch. You just need to specify what size you want your image, and then you go plotting pixel by pixel in a given colour with the plot function.
PNGwriter was originally written with scientists in mind. The need to create an image from the result of a scientific computer simulation arises as a natural part of scientific programming. Getting the data out of the program and into a high quality image in an efficient way can sometimes be hard, especially if the user is not a very experienced programmer.The methods used can often be highly inefficient or too complex to be good for work.
If the data is in (x, y) form, then one can use any of the many plotting programs out there, like gnuplot, R. Br�hl's excellent Abscissa and so on.
If, on the other hand, the data is in (x, y, z) form, one must choose how to represent the third variable. Software such as Mathematica offers many alternatives in this respect, but if the amount of data points is considerable, rendering an image using Mathematica as an array of pixels using text-based data is many, many times slower than rendering the image to disk from the C++ program itself. Consider the bottlenecks involved: the program must produce a file, writing the data in ASCII mode. This is about two orders of magnitude slower than outputting the data in binary mode. It must then be rendered by Mathematica, using vector graphics (one object per pixel). It is only at this stage that one can convert the image to a lossless bitmap image format such as PNG or TIFF. Another possibility is to use ImageMagick or Netpbm to process the data, but again, one is limited by the fact that the data must be written in ASCII format first, and support for 24-bit colour in the PPM file format is not standardized (i.e., mostly non-existent) and is endian-dependent.
PNGwriter was written as a possible solution to this issue. Its interface is extremely intuitive, there is only one new object to learn about (the PNGwriter class), in other words, no classes and subclasses for pixels, colours, bitmaps, filenames, etc. As long as you know what colour you want the pixel at position (x, y) to be, you can implement any algorithm you want. Want to play with cellular automata but are tired of seeing you results as an array of 1s and 0s in text? Want to have a go at exploring fractals yourself? Need a quick way to implement that image-recognition algorithm you are working on for your autonomous rover, driverless vehicle or robot arm? Want to simulate gravitational lensing but haven't yet been able to create an actual image from your algorithm? Need to simulate an object moving on an energy surface, using interpolation between the available data points? PNGwriter can help!
What's new in PNGwriter 0.5.4:
- Corrected filegamma_ from 0.5 in one constructor to 0.6 as in all others.
- PNGwriter now handles a much greater range of input files with readfromfile(). In general, the alpha channel is discarded gracefully. Issues remain: A PNG with information in the chroma chunk will not be read too accurately, and a PNG with a transparency chunk will be read incorrectly, though silently.
- Fixed compiler warnings in drawtriangle() and drawbottom().
PNGwriter 0.5.4
add to watchlist add to download basket send us an update REPORT- runs on:
- Linux
- filename:
- pngwriter-0.5.4.tar.gz
- main category:
- Multimedia
- developer:
- visit homepage
Windows Sandbox Launcher 1.0.0
7-Zip 23.01 / 24.04 Beta
Microsoft Teams 24060.3102.2733.5911 Home / 1.7.00.7956 Work
calibre 7.9.0
Context Menu Manager 3.3.3.1
IrfanView 4.67
Bitdefender Antivirus Free 27.0.35.146
ShareX 16.0.1
Zoom Client 6.0.3.37634
4k Video Downloader 1.5.3.0080 Plus / 4.30.0.5655
- ShareX
- Zoom Client
- 4k Video Downloader
- Windows Sandbox Launcher
- 7-Zip
- Microsoft Teams
- calibre
- Context Menu Manager
- IrfanView
- Bitdefender Antivirus Free