
-----------------------------------
sensfan
Mon Jan 23, 2006 2:09 pm

Import error
-----------------------------------
:coffe: 
I have tried using the import code in the turing help file. But it won't successfully create the image.

var picID: int
        var x, y : int
        
        picID := Pic.FileNew ("shield_right.bmp")
        
        Pic.Free (picID)


Is there another way to import an image?

Thanks.

-----------------------------------
Tupacalypse_Vinsanity
Mon Jan 23, 2006 4:04 pm

~
-----------------------------------
You have to specify where the image is, like c:\shield_right.bmp for example

Also i wouldnt use Pic.Free, id make a new variable called pic1 or something, make it an int and do a Pic.Draw


var pic : int := Pic.FileNew ("c:\shield_right.bmp")
Pic.Draw (pic,0,0,picCopy)


-----------------------------------
Tony
Mon Jan 23, 2006 4:28 pm


-----------------------------------
Pic.Free releases the memory held by the image, as well as internal identifications/pointers. Pic.Free should be used once the image is no longer needed.

-----------------------------------
blaster009
Mon Jan 23, 2006 5:12 pm


-----------------------------------
But ONLY when you absolutely don't need it any more.  And never when dealing with GUI functions.  I hate GUI functions.

-----------------------------------
MysticVegeta
Mon Jan 23, 2006 5:29 pm

Re: ~
-----------------------------------
You have to specify where the image is, like c:\shield_right.bmp for example

Also i wouldnt use Pic.Free, id make a new variable called pic1 or something, make it an int and do a Pic.Draw


var pic : int := Pic.FileNew ("c:\shield_right.bmp")
Pic.Draw (pic,0,0,picCopy)


You dont have to specify the folder if the image is in the same folder as your source code.

-----------------------------------
Rasta Fella
Mon Jan 23, 2006 5:46 pm

Re: ~
-----------------------------------
You have to specify where the image is, like c:\shield_right.bmp for example

Also i wouldnt use Pic.Free, id make a new variable called pic1 or something, make it an int and do a Pic.Draw


var pic : int := Pic.FileNew ("c:\shield_right.bmp")
Pic.Draw (pic,0,0,picCopy)


You dont have to specify the folder if the image is in the same folder as your source code.

sensfan if you are going to import pictures always good to practice to keep your pictures under the same root folder as your source code. Also just to keep the confusion from getting to your head if you had two pictures under two different folders always specify where you are getting the picture from ,less confusion.

-----------------------------------
person
Mon Jan 23, 2006 7:16 pm


-----------------------------------
I hate GUI functions.
then make your own :lol:
