[Gambas-user] Re; Image handling ...

Gareth Bult gareth at ...1689...
Fri Jul 27 00:39:47 CEST 2007


Urm,

I was using a picture box and you said;

> 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. 

Well, the picture is ~ 12k bytes at 320x240 or about 55k at 640x480 ...
So I opted for Cached = FALSE ..

I just tried;

  draw.Begin($canvas)
  draw.Picture($picture, 0, 0, 320, 240)  
  draw.End

in place of $canvas.Refresh with Cached = TRUE .. got a blank page ...

Not sure how cached = True works .. will investigate if you think it will help ..

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 26, 2007 11:11:43 PM (GMT) Europe/London
Subject: Re: [Gambas-user] Re; Image handling ...

On jeudi 26 juillet 2007, Gareth Bult wrote:
> Ok,
>
> I now have nifty little app for recording all my CCTV images off a variable
> number of camera and it's all looking great.
>
> However, I don't know where to start with the screen flicker problem .. it
> did go away initially using the draw code you suggested, but it seems to
> have come back as a result of using a more recent SVN.
>
> I use a separate recorder to store the images in Blobs (MySQL) and recover
> them with;
>
>   File.Save(name, resultSet!image.Data)
>   $picture = Picture.Load(name)
>
> Then issue;
>
>   $canvas.Refresh
>
> Then have;
>
> PUBLIC SUB CANVAS_Draw()
>   draw.Picture($picture, 0, 0, 320, 240)
> END
>
> Works well, but refresh flickering is every couple of seconds and quite
> frustrating as it destroys viewing "quality".
>
> Can anyone point me in the right direction re; where to look ?
> (There doesn't "seem" to be much scope for my code to cause this ???)
>
> tia
> Gareth.
>

Why don't you use a "cached" DrawingArea ?

-- 
Benoit Minisini

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
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