Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 8 of 8 total
Thread TImage need a refresh ?
Thu, Feb 5 2015 4:48 PMPermanent Link

sagt3k

Web Builder beautiful and very useful software for those who not working with the web and working with Delphi.
I'm using the trial version and I was using TImage to view snapshots from IP cameras. But the object TImage apart "ImageName" does not have a refresh, and it seems that every time I call the same "ImageName" nothing happens. It would be interesting method "refresh".
Thanks for your suggestion.
Thu, Feb 5 2015 5:40 PMPermanent Link

Uli Becker

You can workaround that by setting imagename='' each time before
displaying the new image.

Uli
Fri, Feb 6 2015 3:57 AMPermanent Link

Matthew Jones

Uli Becker wrote:

> You can workaround that by setting imagename='' each time before
> displaying the new image.
>
> Uli

You may also find that adding parameters works. So
http://sample.com/image.png?rev=39
http://sample.com/image.png?rev=40

etc

The parameters are ignored on the server, but the browser doesn't know
that so fetches it anyway.

--

Matthew Jones
Fri, Feb 6 2015 4:27 AMPermanent Link

Uli Becker

Matthew,

> You may also find that adding parameters works. So
> http://sample.com/image.png?rev=39
> http://sample.com/image.png?rev=40

Not bad!

Uli
Fri, Feb 6 2015 6:10 AMPermanent Link

sagt3k

Hi Uli and Matthew

I had already tried this solution :

Count:=Count+1
Image1.ImageName:='http://192.168.0.123:8081/snapshot.cgi?user=guest&pwd=guest&i='+IntToStr(Count);

OK this is a good solution, but every time you load the image first appears in a while a white image and then the new image. The problem does not depend on IPCAM, as I tried to do a similar thing with taltri SW and refreshing white does not depend IPCAM. Image1 as if you cancel before the image and then load the new one. Unfortunately, this problem is not visually pleasing. How can I fix it?

Thanks
sagt3k
Fri, Feb 6 2015 6:53 AMPermanent Link

Rick

On 06/02/15 22:10, sagt3k wrote:
> I had already tried this solution :
>
> Count:=Count+1
> Image1.ImageName:='http://192.168.0.123:8081/snapshot.cgi?user=guest&pwd=guest&i='+IntToStr(Count);
>
> OK this is a good solution, but every time you load the image first appears in a while a white image and then the new image. The problem does not depend on IPCAM, as I tried to do a similar thing with taltri SW and refreshing white does not depend IPCAM. Image1 as if you cancel before the image and then load the new one. Unfortunately, this problem is not visually pleasing. How can I fix it?
>
>

Try placing the TImage on a TPanel and do the following:

Panel1.BeginUpdate;
Image1.ImageName:=...
Panel1.EndUpdate;

This may not work because the image is loaded asynchronously so you
might need to do the BeginUpdate to prevent the panel/image from
updating and perform the EndUpdate in the TImage.OnLoad event. OnLoad
should only fire when the image has been downloaded.

--
Rick
Fri, Feb 6 2015 8:15 AMPermanent Link

Raul

Team Elevate Team Elevate

On 2/6/2015 6:10 AM, sagt3k wrote:
> OK this is a good solution, but every time you load the image first appears in a while a white image and then the new image. The problem does not depend on IPCAM, as I tried to do a similar thing with taltri SW and refreshing white does not depend IPCAM. Image1 as if you cancel before the image and then load the new one. Unfortunately, this problem is not visually pleasing. How can I fix it?

What about 2 image controls on top of each other hiding one and then the
other and also alternating the loading of the new image (don't hide it
until other image has loaded.

Raul
Fri, Feb 6 2015 9:37 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com


<< OK this is a good solution, but every time you load the image first
appears in a while a white image and then the new image. The problem does
not depend on IPCAM, as I tried to do a similar thing with taltri SW and
refreshing white does not depend IPCAM. Image1 as if you cancel before the
image and then load the new one. Unfortunately, this problem is not visually
pleasing. How can I fix it? >>

What do you mean by "white image" ?  Did you set the TImage.Transparent
property to True ?  With that set, you shouldn't see anything besides the
background of the underlying container until the image is loaded.

Tim Young
Elevate Software
www.elevatesoft.com
Image