Computer Science Canada

importing Pics

Author:  jesah [ Sat May 31, 2008 5:03 pm ]
Post subject:  importing Pics

Hey guys, i tried to search this in the turing help but doesnt seem to work...Can you tell me how to import pics? the file name is trex.jpg. Thanks

Author:  TheWanderer [ Sat May 31, 2008 6:16 pm ]
Post subject:  Re: importing Pics

jesah @ Sat May 31, 2008 5:03 pm wrote:
Hey guys, i tried to search this in the turing help but doesnt seem to work...Can you tell me how to import pics? the file name is trex.jpg. Thanks


First assign a new int variable that will hold the memory for this image
for this you use the Pic module

Turing:
var trexImg := Pic.FileNew ("trex.jpg")


make sure this image is in the same directory as your .t file, otherwise you'll encounter an error
if you need it in another directory just put the full pathname into the syntax instead of just the image name

to draw this image somewhere on the screen use the Pic.Draw function

Turing documentation does a much better job explaining this, try searching in there next time; much faster and you get some nice free demos Wink

good luck!

Author:  jesah [ Sat May 31, 2008 7:36 pm ]
Post subject:  RE:importing Pics

Thanks bro


: