ZLIB

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

ZLIB

Rainer Stratmann
For a Webserver I need to create the png graphics format.

I want to use as little external components as possible.

Has someone experience with the zlib format or specification?
Can it be used without allocating memory?
Or with a given memoryblock for operation?

I would like to prevent allocating memory and freeing memory all the times...
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: ZLIB

Michael Van Canneyt


On Mon, 8 Nov 2010, Rainer Stratmann wrote:

> For a Webserver I need to create the png graphics format.
>
> I want to use as little external components as possible.

What is wrong with the existing png reader ?

Michael.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: ZLIB

Felipe Monteiro de Carvalho
The text rendering example also shows how to write a png image:

http://wiki.lazarus.freepascal.org/fcl-image#Drawing_text

--
Felipe Monteiro de Carvalho
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: ZLIB

Rainer Stratmann
In reply to this post by Michael Van Canneyt
Am Monday 08 November 2010 11:59:27 schrieb Michael Van Canneyt:
> On Mon, 8 Nov 2010, Rainer Stratmann wrote:
> > For a Webserver I need to create the png graphics format.
> >
> > I want to use as little external components as possible.
>
> What is wrong with the existing png reader ?
>
> Michael.

I don't know any bugs in the existing png reader.

My application is running in a critical environment.
Also the webserver code I wrote completely myself.
All with static memory. No dynamic allocating memory blocks.
In these days memory is not the problem.
http://demo.klimaregelung.de
For showing measuring values I need png support.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: ZLIB

tcoq
On 08/11/2010 13:07, Rainer Stratmann wrote:
...
> http://demo.klimaregelung.de
> For showing measuring values I need png support.
> _______________________________________________
>    
Interesting demo. Do you have it in English? Do you intend to have
multi-language support?

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: ZLIB

Adriaan van Os-2
In reply to this post by Rainer Stratmann
Rainer Stratmann wrote:
> For a Webserver I need to create the png graphics format.
>
> I want to use as little external components as possible.
>
> Has someone experience with the zlib format or specification?
> Can it be used without allocating memory?
> Or with a given memoryblock for operation?

zlib's compress2 operates on memory blocks that you give it, but I am not sure whether it allocates
temporary buffers. Note that I tried FPC's zlib but it crashed on Windows. Instead, on Windows, I
am linking to

{$linklib Libs/mingw/libz.a}
{$linklib Libs/mingw/libmsvcrt.a}
{$linklib Libs/mingw/libgcc.a}

On the Mac, zlib is part of the system software.

Regards,

Adriaan van Os

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal