-
December 3rd, 2001, 12:12 PM
#1
Problems with Picture object in memory
I have this routine to make a screencapture.
The result is a Picture object.
Then i do the following:
set Picture1.picture= ResultPicture
The pictures shows as it should.
Then when i try to use the Picture1.Picture.handle as parameter for another function, it fails.
When i repeat the same but first save the Picture1.Picture to disk with savepicture and then load it again with LoadPicture, everything goes fine!
What is the difference in data stored in a Picture Object after screencapture, and after loading it from disk?
If someone needs the source to understand the problem then let me know, it's to large to fit into this post.
-
December 4th, 2001, 01:46 AM
#2
Re: Problems with Picture object in memory
Picture box actually has 2 things!.. One picture and another Image.. Try using the .Image property it may work
it is something to do with 2 DCs and internal management for easy blitting, overlays etc..
RK
-
December 4th, 2001, 08:51 AM
#3
Re: Problems with Picture object in memory
Tried using Image and stuff.. none works...
This might clear-up the problem:
This one works:
set Picture1.Picture = modScreenCapture.CaptureScreen
SavePicture Picture1.Picture, "c:\test1.bmp"
set Picture1.Picture = LoadPicture("c:\test1.bmp")
If m_cDib.LoadByCapture(Picture1.Picture.handle) then
...
This one doesn't work:
set Picture1.Picture = modScreenCapture.CaptureScreen
'SavePicture Picture1.Picture, "c:\test1.bmp"
'set Picture1.Picture = LoadPicture("c:\test1.bmp")
If m_cDib.LoadByCapture(Picture1.Picture.handle) then
...
Why?
What is actually happening with the imagedata after saving and loading it from file and if someone knwos, how can i alter this data so that it will be acceptd by the latter function, without saving to disk first...
One would say: why not save to disk first?!
I can't, because this routine must be runned about 5 times a second, and you can imagine that it will not increase the speed ;-)
Thanx in advance!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|