Recent

Author Topic: [SOLVED] BGRABitmap - support for GIF or APNG?  (Read 7605 times)

Dibo

  • Hero Member
  • *****
  • Posts: 1046
[SOLVED] BGRABitmap - support for GIF or APNG?
« on: August 02, 2012, 12:19:34 am »
Hi,

Has BGRABitmap package support for GIF or APNG (Animated PNG)? Animation is not necessary, but I want some access to frames (then I create animation using timer)

Regards
« Last Edit: August 02, 2012, 07:49:39 pm by Dibo »

Dibo

  • Hero Member
  • *****
  • Posts: 1046
Re: BGRABitmap - support for GIF or APNG?
« Reply #1 on: August 02, 2012, 12:39:15 am »
Ok, I found TBGRAAnimatedGif, but it has some problems with transparency (black background, I attached gif file). What about APNG?

Linux Ubuntu 12.04 64bit, GTK2
BGRABitmap ver. 5.7.1

Leledumbo

  • Hero Member
  • *****
  • Posts: 8142
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: BGRABitmap - support for GIF or APNG?
« Reply #2 on: August 02, 2012, 02:31:24 am »
What black background? Your attachment is working here, transparent background.

Dibo

  • Hero Member
  • *****
  • Posts: 1046
Re: BGRABitmap - support for GIF or APNG?
« Reply #3 on: August 02, 2012, 09:39:38 am »
Sorry, I attached original gif which I'm using for drawing. I attached screenshot now.
« Last Edit: August 02, 2012, 10:05:46 am by Dibo »

circular

  • Hero Member
  • *****
  • Posts: 3085
    • Personal webpage
Re: BGRABitmap - support for GIF or APNG?
« Reply #4 on: August 02, 2012, 09:53:09 am »
Attachment did not work apparently.

About APNG, it would be relatively simple to implement it by reading the chunks and creating a virtual PNG file for each frame, load these images, and then draw them with PutImage.
« Last Edit: August 02, 2012, 10:04:16 am by circular »
Conscience is the debugger of the mind

Dibo

  • Hero Member
  • *****
  • Posts: 1046
Re: BGRABitmap - support for GIF or APNG?
« Reply #5 on: August 02, 2012, 10:06:37 am »
I edited previous post and added screenshot

circular

  • Hero Member
  • *****
  • Posts: 3085
    • Personal webpage
Re: BGRABitmap - support for GIF or APNG?
« Reply #6 on: August 02, 2012, 10:21:02 am »
Ok. Can you attach the project as well ? It may be a matter of options.
Conscience is the debugger of the mind

Dibo

  • Hero Member
  • *****
  • Posts: 1046
Re: BGRABitmap - support for GIF or APNG?
« Reply #7 on: August 02, 2012, 10:45:58 am »
In attachments

BTW: I found on forum first version of this component named TAnimatedGif and works better. I mean, background is clear but colors have no transparency (for example, internet browser can get transparency of this gif - see like attachment look in my second post)

circular

  • Hero Member
  • *****
  • Posts: 3085
    • Personal webpage
Re: BGRABitmap - support for GIF or APNG?
« Reply #8 on: August 02, 2012, 12:28:19 pm »
Thanks. Ok I guess I found the problem. It is fixed on subversion.
Conscience is the debugger of the mind

Dibo

  • Hero Member
  • *****
  • Posts: 1046
Re: BGRABitmap - support for GIF or APNG?
« Reply #9 on: August 02, 2012, 01:19:31 pm »
Thanks! Works. Too bad that the gif does not have opacity on pixels. I must set background color similar to form color to get some "antyalias" effect (BTW: good generator: http://preloaders.net/). APNG could works better ;)

circular

  • Hero Member
  • *****
  • Posts: 3085
    • Personal webpage
Re: BGRABitmap - support for GIF or APNG?
« Reply #10 on: August 02, 2012, 06:13:31 pm »
Oh well that's a limitation of Gif files. I'm sorry I have other priorities right now than doing an APNG support. Maybe in the future.

But as I said, I guess it is not so complicated to do this. Just read some APNG file, parse the different blocks, and put some of them in a stream for each frame.

Also, it will need that PNG support is not buggy anymore. A bug report has recently been made, and maybe it will be fixed some day.
Conscience is the debugger of the mind

Dibo

  • Hero Member
  • *****
  • Posts: 1046
Re: BGRABitmap - support for GIF or APNG?
« Reply #11 on: August 02, 2012, 07:49:09 pm »
Ok. Thanks anyway. Topic solved :)

circular

  • Hero Member
  • *****
  • Posts: 3085
    • Personal webpage
Re: [SOLVED] BGRABitmap - support for GIF or APNG?
« Reply #12 on: August 02, 2012, 08:29:01 pm »
Ok.  8-)
Conscience is the debugger of the mind