On Mon, 28 May 2007 09:28:14 +0200
"A.J. Venter" <[EMAIL PROTECTED]> wrote:

> Hi all,
> I've had some fun looking at the PascalMagick units which Felipe et.
> all did - and I must admit to being quite impressed.
> This however brings up immediately the question (for me at least) -
> how hard would it be to create a loader component similiar to
> Imaging4Lazarus which can load images supported by magick into
> TPicture ?

Do you mean imagesforlazarus?
I guess, it is easy to write some FPImage readers/writers using
pascalmagick.


> That would immediately expand the list of available image formats to
> supported Lazarus apps by a very large amount.
> The second question I know has been asked before (but I am not aware
> of any consensus on it) and it may not be related - how can one go
> about adding supported for animated image formats (in particular gif
> and mng) to Lazarus ?

I'm not an expert here, so I would suggest to write an mng (TBitmap
descendant) and see what is needed for loading/saving multiple
images and animation.


> Through a TPicture extension ?

Of course.


> A completely sepperate component with
> animation (and probably double-buffer) support ?

Not needed.

 
> The immediate thought that occurs to me is that gif animations work by
> storing each frame in a layer, and using the layer descriptions to
> hold the time to display it. So a component with a series of
> dynamically created TPicture's which cycles the "visible" property
> between them according to the layer descriptions and places one layer
> in each TPicture could certainly do it.

IMO it would better to use a single TMNG instead of multiple TPictures.
The TMNG can have a TTimer to change the content of the canvas.
TPicture is already connected to the OnChange events and TImage to the
TPicture.OnChange. So the TMNG just needs to paint the next image to
the Canvas and any control/object using the TMNG will show
the animation.


> Will need some overhead and probably a TTimer integrated but it should
> certainly be doable - if you can at least have support to
> 1) load a single layer from a gif file into a TPicture
> 2) Get the layer descriptions from the gif file.
> 
> I would be happy to code such a component if there is a consensus it
> will work like this, and somebody is willing to help me solve the 2
> prerequisites (which could be done through a seperate library if
> needed - libungif ?)


Mattias

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to