Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2003-12

How to load a png image

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Karim

Hello

I want to know, how to load a png image with freepascal ? There is a png libpng package shipped with FreePascal, but I cannot find any examples or docs.
Or are there any onther simple image formats that can be loaded into a freepascal program ?
Some suggestions would be nice.
Thanks
Karim

Karim -- http://www.fastmail.fm - Same, same, but different…
Michalis Kamburelis
to Karim
Karim wrote 5 lines
Hello I want to know, how to load a png image with freepascal ? There is a png libpng package shipped with FreePascal, but I cannot find any examples or docs.

Pascal unit Libpng is just a wrapper that calls functions from libpng.so. Documentation for libpng is available at the official page of libpng, http://www.libpng.org, you will most likely be interested in this document:
http://www.libpng.org/pub/png/libpng-1.2.5-manual.html

Or are there any onther simple image formats that can be loaded into a freepascal program ?

Well, everything can be loaded into a Pascal program...

The simplest possible image format is ppm (it is just a small header + array of RGB values for each pixel) - if you are on UNIX-like system and have installed proper documentation then
man ppm
should give you a simple specification of ppm format. You may also take a look at it's cousins, pbm, pgm and the most general one, pnm.

Regards,
Michalis

Karim
to Michalis Kamburelis

Thanks you Michalis.
The main libpng page seems to be down, but I will check it out. I`m looking for a small and easy loadable image format. I think, png will do the job well.

Greetings Karim

On Sun, 21 Dec 2003 23:26:08 +0100, "Michalis Kamburelis" said:

Show quoted text 32 lines
Karim wrote: > Hello > > I want to know, how to load a png image with freepascal ? > There is a png libpng package shipped with FreePascal, but I cannot find > any examples or docs. Pascal unit Libpng is just a wrapper that calls functions from libpng.so. Documentation for libpng is available at the official page of libpng, http://www.libpng.org, you will most likely be interested in this document: http://www.libpng.org/pub/png/libpng-1.2.5-manual.html > Or are there any onther simple image formats that can be loaded into a > freepascal program ? Well, everything can be loaded into a Pascal program... The simplest possible image format is ppm (it is just a small header + array of RGB values for each pixel) - if you are on UNIX-like system and have installed proper documentation then man ppm should give you a simple specification of ppm format. You may also take a look at it's cousins, pbm, pgm and the most general one, pnm. Regards, Michalis _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Karim -- http://www.fastmail.fm - A no graphics, no pop-ups email service