PNG image en- and de-coders.. 2020 update
Andy Balba
pwplus7 at gmail.com
Tue Aug 11 18:29:28 UTC 2020
Found this 2012 Forum post :
https://forum.dlang.org/post/jrklsj$2lt9$1@digitalmars.com
and thought that D-folks interested in this topic may find an
"update" helpful.
FWIW here's my contribution to such an update (others obviously
appreciated):
https://code.dlang.org/packages/imageformats
has a very quick learing curve and allows easy extraction all
code related to encoding and decodeing PNG images into a single
module.
The PNG code handles 8- and 16-bit color depths, gary colors,
gray+alpha, RGB and RGBA. This code also offers en- and de-coding
of BMP and TGA, and de-coding only of JPEG; but my interest is
PNG only.
To this extracted module I've added other modules /functions for :
* commonly used color transformation functions e.g.
rgb_to_ycbcr(), RGB_to_gray(), wave_length_nm_to_rgb()
* various RGB color-maps
* a Cartesian system that transforms 2D X-Y Cartesian
co-ordinates into xy screen coordinates allowing one to create
images using X-Y instead of screen co-ordinates
* several utility functions
More information about the Digitalmars-d
mailing list