Recent

Author Topic: TGIFViewer component  (Read 8350 times)

Alextp

  • Hero Member
  • *****
  • Posts: 787
    • UVviewsoft
Re: TGIFViewer component
« Reply #30 on: November 19, 2018, 11:59:51 pm »
Hi, can you pls, create component for PNG Animated?
https://en.wikipedia.org/wiki/APNG

HeavyUser

  • Sr. Member
  • ****
  • Posts: 262
Re: TGIFViewer component
« Reply #31 on: November 20, 2018, 06:59:48 am »

Alextp

  • Hero Member
  • *****
  • Posts: 787
    • UVviewsoft
Re: TGIFViewer component
« Reply #32 on: November 20, 2018, 07:37:48 am »
This link doesn't help, no component.

HeavyUser

  • Sr. Member
  • ****
  • Posts: 262
Re: TGIFViewer component
« Reply #33 on: November 20, 2018, 08:07:28 am »
This link doesn't help, no component.
good learn to program first

BeanzMaster

  • Full Member
  • ***
  • Posts: 160
Re: TGIFViewer component
« Reply #34 on: November 20, 2018, 11:47:52 am »
Hi, can you pls, create component for PNG Animated?
https://en.wikipedia.org/wiki/APNG
Hi Alex, yes i'll can, i not many time actually. I'll take a look, PNG and APNG is on my todo list ;)

This link doesn't help, no component.
good learn to program first

Before write a comment like this,  have you see who is Alextp ? surely not ! so please don't be so casual.

[EDIT] for informations from your "utilbo" it's don't work, don't compile anyway. Missing unit, and only support PNG but not APNG completely so....

Best regards
« Last Edit: November 20, 2018, 12:07:04 pm by BeanzMaster »

HeavyUser

  • Sr. Member
  • ****
  • Posts: 262
Re: TGIFViewer component
« Reply #35 on: November 20, 2018, 05:58:40 pm »
This link doesn't help, no component.
good learn to program first

Before write a comment like this,  have you see who is Alextp ? surely not ! so please don't be so casual.
irrelevant. Comments like "Its not a component so I can't use it" come only from laziness.

[EDIT] for informations from your "utilbo" it's don't work,
don't compile anyway. Missing unit, and only support PNG but not APNG completely so....
Not my code.
don't compile anyway. Missing unit, and only support PNG but not APNG completely so....
Good write your own. What am I your daddy to help you learn how to walk.

Rusty

  • Newbie
  • Posts: 3
Re: TGIFViewer component
« Reply #36 on: March 03, 2019, 01:17:28 pm »
Hi BeanzMaster

Thank you for this great component. I am new to Lazarus, and have been searching for a couple of days for a way to show an animated gif.  All the other answers I found were incomplete or impossible for me to work out how to implement. Your instructions are very clear and worked first time.

One thing I found is that the gif file has to be present in the users file system. This is not a problem for me.

Cheers

BeanzMaster

  • Full Member
  • ***
  • Posts: 160
Re: TGIFViewer component
« Reply #37 on: March 04, 2019, 04:19:54 pm »
Hi BeanzMaster

Thank you for this great component. I am new to Lazarus, and have been searching for a couple of days for a way to show an animated gif.  All the other answers I found were incomplete or impossible for me to work out how to implement. Your instructions are very clear and worked first time.

Hi, Thanks.

One thing I found is that the gif file has to be present in the users file system. This is not a problem for me.

Cheers

Hum i never has this problem, i have many gif on differents folders or on usb sticks, all works

What is your OS ?

In which case it's happen exactly ?

How you use TGFiViewer (how you load the gifs ?

Cheers

Rusty

  • Newbie
  • Posts: 3
Re: TGIFViewer component
« Reply #38 on: March 06, 2019, 01:48:10 pm »
Hi BeanzMaster

Sorry for the late reply.

I am using Win 7. When I tested the compiled application on a Win 8 machine, it produced a message saying file not found. At that time the gif was not installed on that machine.

The application is a simple form with one animated gif, specified in the TGIFViewer FileName property as C:\development\images\loading18.gif. See attached.

Cheers
Rusty

lucamar

  • Hero Member
  • *****
  • Posts: 1064
Re: TGIFViewer component
« Reply #39 on: March 06, 2019, 02:18:14 pm »
One thing I found is that the gif file has to be present in the users file system. This is not a problem for me.

Hum i never has this problem, i have many gif on differents folders or on usb sticks, all works

If I understand correctly, he means that the gif file must be physically present in the disk (which is quite logical) and cannot be loaded from, say, a web URL or something else.

The application is a simple form with one animated gif,  specified in the TGIFViewer FileName property as C:\development\images\loading18.gif. See attached.

If I were you, I would make the program load the image from the same folder that the program is in. That way you could just just load it in the OnCreate event by using something like:
Code: [Select]
GIFViewer.LoadFromFile(ProgramDirectory + 'myimage.gif');
Or you could add it as a resource and use LoadFromResource
« Last Edit: March 06, 2019, 02:32:08 pm by lucamar »
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 1.8.4/FPC 3.0.4 on:
(K|L)Ubuntu 12..16, Windows XP SP3 (Home/Prof.), various DOSes.

Rusty

  • Newbie
  • Posts: 3
Re: TGIFViewer component
« Reply #40 on: March 12, 2019, 11:34:31 am »
Hi BeanzMaster and lucamar

As a Newbie I didn't explain my point very well. Now I have learnt a bit more about Lazarus, I guess I meant that TGIFViewer doesn't act like TImage. I have used TImage on my form, and this appears to load its image in actual code into main.lfm , as opposed to TGIFViewer that just keeps a reference to the image in the user file system (see snapshots attached).
This is not a problem to me, (and thanks for the suggestions), it is just different.
Cheers Rusty

lucamar

  • Hero Member
  • *****
  • Posts: 1064
Re: TGIFViewer component
« Reply #41 on: March 12, 2019, 01:15:35 pm »
Hi BeanzMaster and lucamar

As a Newbie I didn't explain my point very well. Now I have learnt a bit more about Lazarus, I guess I meant that TGIFViewer doesn't act like TImage. I have used TImage on my form, and this appears to load its image in actual code into main.lfm , as opposed to TGIFViewer that just keeps a reference to the image in the user file system (see snapshots attached).
This is not a problem to me, (and thanks for the suggestions), it is just different.
Cheers Rusty

Oh, I see. Yes, the difference is that if you load  a picture in TImage at design-time the picture data is added to the form resource, while TGifViewer only stores the filename.
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 1.8.4/FPC 3.0.4 on:
(K|L)Ubuntu 12..16, Windows XP SP3 (Home/Prof.), various DOSes.

BeanzMaster

  • Full Member
  • ***
  • Posts: 160
Re: TGIFViewer component
« Reply #42 on: March 15, 2019, 04:19:54 pm »
Hi, yes TGifViewer only store the filename if you want to integrate a gif in your app create a Res file (with LazRes) and load it with LooadFromResource see the 2nd demos.

Cheers