Connecting Tech Pros Worldwide Forums | Help | Site Map

PNG files

bob@coolgroups.com
Guest
 
Posts: n/a
#1: Jul 23 '05
Does anyone know how to read a PNG file in C++?

Thanks.


Ivan Vecerina
Guest
 
Posts: n/a
#2: Jul 23 '05

re: PNG files


<bob@coolgroups.com> wrote in message
news:1115286697.604999.141150@g14g2000cwa.googlegr oups.com...[color=blue]
> Does anyone know how to read a PNG file in C++?[/color]

libpng: http://www.libpng.org/pub/png/libpng.html

Cheers,
Ivan
--
http://ivan.vecerina.com/contact/?subject=NG_POST <- email contact form
Brainbench MVP for C++ <> http://www.brainbench.com


Hugo Juarez Corrá
Guest
 
Posts: n/a
#3: Jul 23 '05

re: PNG files


Hello,

Exists several ways!!
...but, the more easy:
http://pngwriter.sourceforge.net/

\o/'s
Hugo.

b...@coolgroups.com wrote:[color=blue]
> Does anyone know how to read a PNG file in C++?
>
> Thanks.[/color]

bob@coolgroups.com
Guest
 
Posts: n/a
#4: Jul 23 '05

re: PNG files


Can it read them though?

Hugo Juarez Corrá wrote:[color=blue]
> Hello,
>
> Exists several ways!!
> ..but, the more easy:
> http://pngwriter.sourceforge.net/
>
> \o/'s
> Hugo.
>
> b...@coolgroups.com wrote:[color=green]
> > Does anyone know how to read a PNG file in C++?
> >
> > Thanks.[/color][/color]

paulwb@gmail.com
Guest
 
Posts: n/a
#5: Jul 23 '05

re: PNG files


Yes!

Take a look:

http://pngwriter.sourceforge.net

"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 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. Runs under Linux, Unix, Mac OS X
and Windows. Requires libpng and optionally FreeType2 for the text
support."


Hope you find it useful!

(By the way, I'm PNGwriter's author :-) )

Paul

bob@coolgroups.com
Guest
 
Posts: n/a
#6: Jul 23 '05

re: PNG files


If it requires libpng, why not just use libpng?


paulwb@gmail.com wrote:[color=blue]
> Yes!
>
> Take a look:
>
> http://pngwriter.sourceforge.net
>
> "PNGwriter is a very easy to use open source graphics library that[/color]
uses[color=blue]
> PNG as its output format. The interface has been designed to be as
> simple and intuitive as possible. It supports plotting and reading in
> the RGB (red, green, blue), HSV (hue, saturation, value/brightness)[/color]
and[color=blue]
> CMYK (cyan, magenta, yellow, black) colour spaces, basic shapes,
> scaling, bilinear interpolation, full TrueType antialiased and[/color]
rotated[color=blue]
> text support, bezier curves, opening existing PNG images and more.
> Documentation in English and Spanish. Runs under Linux, Unix, Mac OS[/color]
X[color=blue]
> and Windows. Requires libpng and optionally FreeType2 for the text
> support."
>
>
> Hope you find it useful!
>
> (By the way, I'm PNGwriter's author :-) )
>
> Paul[/color]

Rolf Magnus
Guest
 
Posts: n/a
#7: Jul 23 '05

re: PNG files


bob@coolgroups.com wrote:
[color=blue]
> If it requires libpng, why not just use libpng?[/color]

If you want to just use libpng, why don't you do so?

bob@coolgroups.com
Guest
 
Posts: n/a
#8: Jul 23 '05

re: PNG files


I probably will, but what benefit is there in using PNGwriter also? Is
it mainly for ease of use?

paulwb@gmail.com
Guest
 
Posts: n/a
#9: Jul 23 '05

re: PNG files


Hi.

Regarding your question about PNGwriter versus plain libpng, yes,
basically PNGwriter offers much greater ease of use. If you're an
experienced programmer and just need a simple PNG read or write
function, then surely reading libpng's documentation and throwing
together a PNG reader or writer of your own is something you could do
three times before breakfast :-) (it took me quite a bit longer than
that, I can tell you).

But for the rest of us mere mortals, something slightly more abstract
and easier to use is welcome. As you can see from the feature list that
I posted previously, PNGwriter goes beyond just writing and reading
PNGs in an intuitive and simpe way (via the plot() and read() member
functions), and thus offers the possibility of doing things that you
can just as easily do with libpng, but saving you the work of coding it
yourself. Further pursuit of this explanation would no doubt lead us to
a description of what libraries are for, and thus be rather redundant.
:-)

To illustrate my point, compare the shortest PNG-reading code fragment
using libpng to the equivalent code using PNGwriter. PNGwriter wraps
all that code into one function, thus requiring one line to load a PNG
file.

So, basically, if you feel PNGwriter might be useful to you (visiting
the website would be a good starting point) please go ahead, I will
lend my support via the mailing list however I can. If on the other
hand, you are comfortable using libpng directly, go ahead; that is the
beauty of having a choice.

Best of luck,

Paul Blackburn

Ken Turkowski
Guest
 
Posts: n/a
#10: Jul 23 '05

re: PNG files


In article <1116191959.738123.130080@z14g2000cwz.googlegroups .com>,
bob@coolgroups.com wrote:
[color=blue]
> I probably will, but what benefit is there in using PNGwriter also? Is
> it mainly for ease of use?[/color]

Have you thought about using QuickTime? It runs on Mac and Windows, and
has support for more than just PNG input and output.
Closed Thread