Implementation of a C++ wrapper for libpng

A

Alex Shulgin

Hi,

below is near exact copy of my post to png-mng-implement mailing list
([email protected]). I've got no answer there,
so probably there is not much interest in such a wrapper, at least as
for the members of that list :)

This is cross-posted to comp.lang.c++.moderated and comp.lang.c++.
---------------

I would like to announce the availability of a preliminary version of
png++, my C++ wrapper for libpng.

When I've come to libpng I've noticed that it takes a lot of code just
to load a PNG image and handle all error conditions gracefully. I was
working on a C++ project and hence sought for a way to use libpng the
C++ way. The result is png++.

The libpng's example routine for loading an image is about 300 lines
in C. With png++ you can load an image in just a single line of C++
code, like this:

png::image< png::rgb_pixel > my_image("myimage.png");

Storing the image on disc is also accomplished in a single line, like
this:

my_image.write("myimage2.png");


The project aims to provide simple yet powerful C++ wrapper for
libpng. It has numerous limitations, but I would like to hear from
people what do they think about the project before implementing the
lacking features.

It is known to be incomplete, undocumented, untested and may be buggy.
However, it works for me, and I would be pleased if it would work for
others too. I plan to setup the project on Savannah
(http://savannah.nongnu.org/), however it is not approved yet.

Please follow this link for more information:
http://www.shulgin.org.ua/~shulz/png++/
Here is the direct download link:
http://www.shulgin.org.ua/~shulz/png++/png++-0.1.0.tar.gz

Please note that png++ is distributed under a modified variant of BSD
license.

Comments, suggestions, bug reports are sincerely welcome :)


Happy hacking!
 
A

Alf P. Steinbach

* Alex Shulgin:
Please follow this link for more information:
http://www.shulgin.org.ua/~shulz/png++/
Here is the direct download link:
http://www.shulgin.org.ua/~shulz/png++/png++-0.1.0.tar.gz

Please note that png++ is distributed under a modified variant of BSD
license.

Comments, suggestions, bug reports are sincerely welcome :)

There's also PngWriter, at <url: http://pngwriter.sourceforge.net/>.

Speaking of which, where has ACCU's list of C++ libraries disappeared to?

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
 
D

dave_mikesell

Hi,

below is near exact copy of my post to png-mng-implement mailing list
([email protected]). I've got no answer there,
so probably there is not much interest in such a wrapper, at least as
for the members of that list :)

You might try posting this to graphics newsgroups and mailing lists.
Looks neat, though.
 
A

Alex Shulgin

* Alex Shulgin:



There's also PngWriter, at <url:http://pngwriter.sourceforge.net/>.

Well, yes. But my point is to implement a thin (well, somewhat (-:) C+
+ wrapper around libpng. No image processing and/or text rendering is
ever planned to be added into it. Tough, I think png++ will find it's
applications, for example, in some custom (so to say, in-house) image
processing.
Speaking of which, where has ACCU's list of C++ libraries disappeared to?

Hm... it seems to me it was removed/rearranged somewhere around Feb
2006, when the new website was set up. At least, web.archive.org's
version as of Mar 02 2006 already lacks parts of the list.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,266
Messages
2,571,087
Members
48,773
Latest member
Kaybee

Latest Threads

Top