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

Username:   Password: 
 RegisterRegister   
 Pic.FileNew ???
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
ddndd




PostPosted: Thu Jan 07, 2010 3:30 pm   Post subject: Pic.FileNew ???

im using this command but for some reason it is not working this is my code so far

var picID: int
picID := Pic.FileNew ("1.JPG")

Pic.Draw (picID, x, y, picCopy)
Pic.Free (picID)

can you please tell me what it is wrong ??
i have turing 4.1.1 and 4.1 so ...
Sponsor
Sponsor
Sponsor
sponsor
andrew.




PostPosted: Thu Jan 07, 2010 4:29 pm   Post subject: RE:Pic.FileNew ???

It should work. What error are you getting?

Did you create an x and a y variable? If not, your code should have this at the top with your "var picID : int":
Turing:
var x, y : int
x := 300
y := 300


Also, maybe the picture "1.JPG" can't be found. The way you write it means that 1.JPG has to be in the same folder as your Turing file.
ddndd




PostPosted: Thu Jan 07, 2010 5:23 pm   Post subject: Re: Pic.FileNew ???

yes i do have the x and y
and the pic is inside of the folder too !!
it says illegal picture id number "0" or something like that !!!!!!!
StuartG




PostPosted: Thu Jan 07, 2010 5:50 pm   Post subject: RE:Pic.FileNew ???

Although this may sound dumb but did you save the turing file in the SAME folder as the picture?
(I know this was already suggested but this is the only probable cause, that or your picture file isnt actually a JPG)
andrew.




PostPosted: Thu Jan 07, 2010 6:06 pm   Post subject: Re: Pic.FileNew ???

Illegal Picture ID number 0 means that the picture was not loaded properly. This could be because of a few different problems:
    - The picture 1.JPG is not in the same folder as your Turing file.
    - It is not named 1.JPG
    - The filename may be case-sensitive. e.g. it won't work if the file is "1.jpg" or "1.jpeg"
    - The picture 1.JPG wasn't saved in a readable format for Turing. Try saving it again with Paint.


Edit: Changed the bullet from "?" to "-"
ddndd




PostPosted: Thu Jan 07, 2010 9:12 pm   Post subject: Re: Pic.FileNew ???

got it finally
the pic was saved wrong or something like that i used a diffrent pic and it worked so i just have to remake the pic
thnx guys Smile
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  [ 6 Posts ]
Jump to:   


Style:  
Search: