Problem with Picture
Author |
Message |
Piro24
|
Posted: Sat Dec 23, 2006 1:54 pm Post subject: Problem with Picture |
|
|
I am opening a picture and it works fine
procedure drawMachine
var machine : int := Pic.FileNew ("slotMachine.BMP")
machine := Pic.Scale (machine, maxx, maxy)
Pic.Draw (machine, 0, 0, picCopy)
end drawMachine
When I call that procedure it opens up my picture just fine. But after about 30 seconds it crashes. I don't understand why it would load then crash? It gives me the error "Picture was no created properly" |
|
|
|
|
|
Sponsor Sponsor
|
|
|
StealthArcher
|
Posted: Sat Dec 23, 2006 2:10 pm Post subject: (No subject) |
|
|
Best I can remember, turing will try to load all declared pics, and will not show an error when one does not exist, hoiwever it will shopw sn error when you try to use the picture later on. |
|
|
|
|
|
DIIST
|
Posted: Sat Dec 23, 2006 5:07 pm Post subject: (No subject) |
|
|
The Problem is you need to free you resourses, ie you need to "Pic. Free(machine)" the picture once you don using it or in this case at the end of the procedure drawmachine. Other wise you will constantly create piuctures in memory and this will eveuntally casue the program to crash. I hope that was of some help. |
|
|
|
|
|
|
|