
-----------------------------------
Smarteez
Tue Dec 05, 2006 5:56 pm

How do I import images into my program?
-----------------------------------
I am making a program and need for a picture to appear in it... how do i do this?

-----------------------------------
Dan
Tue Dec 05, 2006 6:13 pm


-----------------------------------
Look up the Pic modal and comands in your turing refrence (F10). It is easyest if your images are in the same dir as your code or in a dir in the dir of you code to make finding it easyer.

Here is a old and simple tutoral for using images in truing: http://compsci.ca/v2/viewtopic.php?t=191&highlight=pic

-----------------------------------
TokenHerbz
Tue Dec 05, 2006 6:16 pm


-----------------------------------
So have a folder inside your directory (should be a folder too) of your game and name it somthing like "Pics".  In this pics folder you will save your images.

To call the image, you need to assign it to a "variable" persay.


var test_pic : int := Pic.FileNew ("Pics/test_pic.bmp") 
%%the var you use dosn't have to be the same as your pic name.


With this, you can use other "Pic." fuctions which are found in F10 of turing to minipulate, etc your puctire.  The following are the commonly used.


var scaled_test_pic : int := Pic.Scale (test_pic, 20, 20)
%%here we get a new pic var and scale it using the test_pic var
Pic.Draw (scaled_test_pic, manx, many, picMerge)
%%this draws the pic, you can use picMerge or use others, look in F10 of turing
Pic.Free(test_pic)
Pic.Free(scaled_test_pic)
%%free's up the pics out of memory


Anyways fiddle around with some things, learn it up, F10 in turing should help alot.

-----------------------------------
TokenHerbz
Tue Dec 05, 2006 6:18 pm


-----------------------------------
awwww.........  /stares at hacker dan

I wasted my time!  zomg!  lol.
