Recent

Author Topic: Animate four pictures?  (Read 1789 times)

Robert W.B.

  • Sr. Member
  • ****
  • Posts: 328
  • Love my Wife, My Kids and Lazarus/Freepascal.
Animate four pictures?
« on: April 27, 2018, 12:06:18 am »
I try to animate four pictures but, only the last picture is shown.
I have to load them, one by one.
Is there anyone how can give me a solution on this?

Thanks in advance
Rob

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: Animate four pictures?
« Reply #1 on: April 27, 2018, 12:21:43 am »
You say like a Gif?
http://wiki.freepascal.org/BGRASpriteAnimation

Or a fading effect?
http://wiki.freepascal.org/BGRAControls#BCEffect (Fading effect with BGRABitmap)

Robert W.B.

  • Sr. Member
  • ****
  • Posts: 328
  • Love my Wife, My Kids and Lazarus/Freepascal.
Re: Animate four pictures?
« Reply #2 on: April 27, 2018, 12:34:23 am »
Hi Lainz. Thanks for Quick reply.
I have for png transparent Picture, i Think this only works with bitmaps?
Rob

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: Animate four pictures?
« Reply #3 on: April 27, 2018, 12:41:01 am »
No, It works with PNG also.

But you need to join them into a single image, one, then the other, to use that component. Sorry is the way I coded it, I was a newby  :)

But alpha is working, thanks to BGRABitmap.

Robert W.B.

  • Sr. Member
  • ****
  • Posts: 328
  • Love my Wife, My Kids and Lazarus/Freepascal.
Re: Animate four pictures?
« Reply #4 on: April 27, 2018, 12:45:28 am »
Nice. But this i don't understand.
To use as replace of TImage just turn on the option 'AnimStatic' and you'll be able to load single images. !
Rob

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: Animate four pictures?
« Reply #5 on: April 27, 2018, 12:48:19 am »
Nice. But this i don't understand.
To use as replace of TImage just turn on the option 'AnimStatic' and you'll be able to load single images. !

Yes.. but that replicates a TImage, without animation at all. If you want to animate, then use it the other way, with a sprite with each 'frame' for each single image, is like a film tape..

You load the 'combined' image and it plays like a movie

Robert W.B.

  • Sr. Member
  • ****
  • Posts: 328
  • Love my Wife, My Kids and Lazarus/Freepascal.
Re: Animate four pictures?
« Reply #6 on: April 27, 2018, 12:52:11 am »
Thanks.I will check it out.
Best regards
Bob :)
Rob

 

TinyPortal © 2005-2018