Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Importing Image
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
MasterCard




PostPosted: Sun Jun 28, 2015 11:57 pm   Post subject: Importing Image

So i tried to import pictures with this code:

var scissors := Pic.FileNew ("Scissors.bmp")
Pic.Draw (scissors, 365, 80, 0)
var rock := Pic.FileNew ("Rock.bmp")
Pic.Draw (rock, 205, 80, 0)
var paper := Pic.FileNew ("Paper.bmp")
Pic.Draw (paper, 285, 80, 0)
var bigpic := Pic.FileNew ("Bigpic.bmp")
Pic.Draw (bigpic, 100, 300, 0)


The 3 images [ Rock paper scissors] go into the turing window.

The last image does not go because of an error with the numbers there i think.

Can someone give me the right numbers [code] that will show the image?

[I dont care where it is unless its on top of the rock, paper and scissors!]

Thank you!
Sponsor
Sponsor
Sponsor
sponsor
Raknarg




PostPosted: Mon Jun 29, 2015 1:55 am   Post subject: RE:Importing Image

Does the program actually not run? If so, tell us what the error message says.
MasterCard




PostPosted: Mon Jun 29, 2015 11:43 am   Post subject: RE:Importing Image

It does run but the 3rd image does not upload. Error is illegal picture ID "0"
Raknarg




PostPosted: Mon Jun 29, 2015 11:50 am   Post subject: RE:Importing Image

That probably means it couldn't find the image you gave it. Make sure the name is exactly right, including the extension
MasterCard




PostPosted: Mon Jun 29, 2015 1:43 pm   Post subject: RE:Importing Image

They are right... Is it because how i got my image or the dimentions? [got it from google.. it was a png and i changed it to bmp] [ dimentions are a bit bigger than the run screen]
Insectoid




PostPosted: Mon Jun 29, 2015 6:15 pm   Post subject: RE:Importing Image

Turing doesn't support PNG files. Changing the extension to .bmp doesn't actually change the file to a bmp file, it just changes the extension. You need to open the file in Paint, click 'save as', then click on 'filetype' and select 'bmp'. Then save it. At least, that's how it worked on Windows XP back in the day, dunno how it works now with Win7/8.
Raknarg




PostPosted: Mon Jun 29, 2015 6:17 pm   Post subject: RE:Importing Image

Same thing, MS paint is just shmancy now
MasterCard




PostPosted: Tue Jun 30, 2015 1:37 pm   Post subject: RE:Importing Image

Fixed it.
[it was a problem with the file, i exported as png from a site and it was good]
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 8 Posts ]
Jump to:   


Style:  
Search: