Recent

Author Topic: Conflict between fcl-image and BGRABitmap?  (Read 3143 times)

lainz

  • Hero Member
  • *****
  • Posts: 3965
  • Leandro Diaz
Re: Conflict between fcl-image and BGRABitmap?
« Reply #15 on: December 20, 2020, 02:09:59 pm »
Yeah we can somehow detect that is assigned a gif file and do the conversion.
https://lainz.github.io/ - My Website :)
https://lazpaint.github.io/ -  Download LazPaint

circular

  • Hero Member
  • *****
  • Posts: 3673
    • Personal webpage
Re: Conflict between fcl-image and BGRABitmap?
« Reply #16 on: December 20, 2020, 07:14:41 pm »
Yep
Conscience is the debugger of the mind

DownUnder47

  • New member
  • *
  • Posts: 8
Re: Conflict between fcl-image and BGRABitmap?
« Reply #17 on: December 22, 2020, 06:26:07 am »
@circular
I thought I had my initial problem re gif files resolved but not so. Today I was messing about with my tutorials and rand into an issue almost identical to that which made me re-open this thread.

I had BGRAControls and therefore BGRABitmap packages installed in the IDE. New project commenced and TImage added to the form (Additional component). Using the Picture property, a gif file was selected and loaded. Now the gif image is seen in design view but when the program runs, no image is displayed. If I uninstall BGRAControls, then the image is displayed.

Maybe I'll just give up on the BGRAControls and add the BGRABitmap package to a project if I need it as these tutorials use a mixture of bmp, gif and png files. Therefore this is going to be an ongoing issue for me.

I had experimented before wondering if the SpriteAnimation control could substitute for the TImage but I think that is just asking it to do something it was not really designed for.

circular

  • Hero Member
  • *****
  • Posts: 3673
    • Personal webpage
Re: Conflict between fcl-image and BGRABitmap?
« Reply #18 on: December 22, 2020, 09:22:05 am »
Hi

If you see the animated GIF in the IDE (with BGRAControls installed), but not when running, I suppose you need to add BGRAAnimatedGif in the uses clause of your project. The picture class needs to be known at runtime to be displayed.

If you don't need animation, you can convert the files into PNG for example before assigning them to TImage.

Thanks anyway for trying things.
Conscience is the debugger of the mind

circular

  • Hero Member
  • *****
  • Posts: 3673
    • Personal webpage
Re: Conflict between fcl-image and BGRABitmap?
« Reply #19 on: December 22, 2020, 03:21:10 pm »
I have fixed the problem of nothing showing up when assigning TBitmap (BGRASpriteAnimation, BitBtn glyph, etc).

Also added support for Gif when assigning sprite of BGRASpriteAnimation from designer.

I guess all is fixed except that if you need to add BGRAAnimatedGif to the uses clause of a project for it to display the animated gif in TImage.
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 3965
  • Leandro Diaz
Re: Conflict between fcl-image and BGRABitmap?
« Reply #20 on: December 23, 2020, 12:57:10 am »
Thanks for the fixes!
https://lainz.github.io/ - My Website :)
https://lazpaint.github.io/ -  Download LazPaint

circular

  • Hero Member
  • *****
  • Posts: 3673
    • Personal webpage
Re: Conflict between fcl-image and BGRABitmap?
« Reply #21 on: December 23, 2020, 02:05:45 am »
You're welcome.

It is funny, I remember that at the time I wrote TBGRAAnimtedGif I did not really understand how TPicture works. Now TImage can be animated.  :)
Conscience is the debugger of the mind

DownUnder47

  • New member
  • *
  • Posts: 8
Re: Conflict between fcl-image and BGRABitmap?
« Reply #22 on: December 23, 2020, 05:20:23 am »
Hi

If you see the animated GIF in the IDE (with BGRAControls installed), but not when running, I suppose you need to add BGRAAnimatedGif in the uses clause of your project. The picture class needs to be known at runtime to be displayed.

If you don't need animation, you can convert the files into PNG for example before assigning them to TImage.

Thanks anyway for trying things.

I have to confess it never occurred to me to do that as I was not using any BGRA controls. Now adding that unit fixes the issue.The reason it was working before is I still had the SpriteAnimation control on the form (unused) and of course that had brought in the necessary units. I'll gt my head around all this yet.

I also wish to thank you for taking the time to make the fixes you have done. Great work.

circular

  • Hero Member
  • *****
  • Posts: 3673
    • Personal webpage
Re: Conflict between fcl-image and BGRABitmap?
« Reply #23 on: December 23, 2020, 06:41:13 am »
You're welcome.

That will be my winter solstice gift to you.  :)
Conscience is the debugger of the mind

 

TinyPortal © 2005-2018