[Gambas-user] Image handling ...

Gareth Bult gareth at ...1689...
Fri Jul 13 01:55:27 CEST 2007


Hi,

Ok the drawing area cracked it .. :-)

On another note .. I'm using a Httpclient connection .. 
This opens a connection to a web server which streams video shots ... works great.

I've yet to discover how to close the channel tho'.

If I do http.Close, then exit back to the ide, the program is still running.
(I'm assuming the http port is still active hence holding the program open)

How do I force a close of the http connection from the client end ?

Gareth.

--
Gareth Bult, Encryptec Limited
Tel: 0845 25 77033, Mob: 07891 389657
Email: gareth at ...1689... 
Statements made are at all times subject to Encryptec's Terms and Conditions of Business, which are available upon request.

----- Original Message -----
From: "Benoit Minisini" <gambas at ...1...>
To: "mailing list for gambas users" <gambas-user at lists.sourceforge.net>
Sent: Thursday, July 12, 2007 9:31:20 PM (GMT) Europe/London
Subject: Re: [Gambas-user] Image handling ...

On jeudi 12 juillet 2007, Gareth Bult wrote:
> Sorry, SVN .. recompiled this week ...
>
> --
> Gareth Bult, Encryptec Limited
> Tel: 0845 25 77033, Mob: 07891 389657
> Email: gareth at ...1689...
> Statements made are at all times subject to Encryptec's Terms and
> Conditions of Business, which are available upon request.
>
> ----- Original Message -----
> From: "Benoit Minisini" <gambas at ...1...>
> To: "mailing list for gambas users" <gambas-user at lists.sourceforge.net>
> Sent: Thursday, July 12, 2007 9:15:43 AM (GMT) Europe/London
> Subject: Re: [Gambas-user] Image handling ...
>
> On jeudi 12 juillet 2007, Gareth Bult wrote:
> > Hi,
> >
> > I'm working on a CCTV application using AXIS IP cameras and I've managed
> > to display a moving video feed from the camera in a Gambas application.
> >
> > I have two questions if anyone can help;
> >
> > a. Is there any way of getting a chunk of data acquired off the network
> > into an image without doing; File.Save("/tmp/temp")
> > obj.Picture.Flush
> > obj.Picture = Picture["/tmp/temp"]
> > (i.e. directly)

Not at the moment. But you should do it this way:

DIM hPict AS Picture

File.Save("/tmp/xxxx")
hPict = Picture.Load("/tmp/xxxx")

By using "/tmp", and a tmpfs system file, you don't lose too much time writing 
a file and read it back.

> >
> > b. If I display the picture in the root of a Window, it's perfect.
> > If I display the image in a PictureBox or a Button, if flickers very
> > badly. Is there a trick to double buffering objects inside a window so
> > they don't flicker on update ?

Don't put a big picture inside a Button: the Button actually stores two 
versions of the picture you set: one normal, and one for the disabled version 
of the normal picture.

The PictureBox will flicker less if its alignment property is set to TopLeft.

But the ideal is using a DrawingArea with Cached = FALSE, and drawing the 
picture in the Draw event. Or with Cached = TRUE if your picture is not too 
big.

> >
> > (if it helps I'm running @ 5fps)

Tell me if you can do better with my advices.

Regards,

-- 
Benoit Minisini

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Gambas-user mailing list
Gambas-user at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user





More information about the User mailing list