Connecting Tech Pros Worldwide Help | Site Map

PNG files

  #1  
Old July 23rd, 2005, 04:58 AM
bob@coolgroups.com
Guest
 
Posts: n/a
Does anyone know how to read a PNG file in C++?

Thanks.

  #2  
Old July 23rd, 2005, 04:58 AM
Ivan Vecerina
Guest
 
Posts: n/a

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


  #3  
Old July 23rd, 2005, 05:01 AM
Hugo Juarez Corrá
Guest
 
Posts: n/a

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]

  #4  
Old July 23rd, 2005, 05:15 AM
bob@coolgroups.com
Guest
 
Posts: n/a

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]

  #5  
Old July 23rd, 2005, 05:15 AM
paulwb@gmail.com
Guest
 
Posts: n/a

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

  #6  
Old July 23rd, 2005, 05:19 AM
bob@coolgroups.com
Guest
 
Posts: n/a

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]

  #7  
Old July 23rd, 2005, 05:19 AM
Rolf Magnus
Guest
 
Posts: n/a

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?

  #8  
Old July 23rd, 2005, 05:26 AM
bob@coolgroups.com
Guest
 
Posts: n/a

re: PNG files


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

  #9  
Old July 23rd, 2005, 05:28 AM
paulwb@gmail.com
Guest
 
Posts: n/a

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

  #10  
Old July 23rd, 2005, 05:51 AM
Ken Turkowski
Guest
 
Posts: n/a

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using .png files Ali Rizwan answers 0 December 4th, 2007 09:02 AM
Loading PNG Files Fromethius answers 2 July 2nd, 2007 11:51 AM
BitBlt with PNG Files Fromethius answers 1 June 26th, 2007 06:01 PM
Convert PNG files to BMP files using PIL Craig answers 2 December 4th, 2006 11:15 PM
png files and imagelists eaglei answers 1 November 20th, 2005 08:41 PM