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

Username:   Password: 
 RegisterRegister   
 Illegal picture ID number error
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
riveryu




PostPosted: Sun Mar 09, 2008 12:57 pm   Post subject: Illegal picture ID number error

Im making an animation project. This is the first time I'm importing a pic and Turing says "Congratulations! Illegal picture ID number (Probable cause: pic creation not successful)".

How do I fix this?

Consider the condtions below:
- I have the pictures in the same folder as program.
- The syntax should be correct
- The pictures appear to be JPEG
- I was not editing the picture with another program while importing it

I have a feeling this is a n00b mistake. I am quite frustrated.

Below is the actual part of the importing and the picture I attempted to import:

Turing:
var explosion:int := Pic.FileNew ("level1.jpeg")
Pic.Draw (explosion, maxx div 2,maxy div 2, 0 )



level1.JPG
 Description:
Its the picture of the first level of an explosion, from LF2
 Filesize:  9.2 KB
 Viewed:  1835 Time(s)

level1.JPG


Sponsor
Sponsor
Sponsor
sponsor
Saad




PostPosted: Sun Mar 09, 2008 1:01 pm   Post subject: Re: Illegal picture ID number error

Turing:
var explosion:int := Pic.FileNew ("level1.jpeg")


Compare the name you specified in that versus your actual file name Wink

It should say level1.jpg, not level1.jpeg
riveryu




PostPosted: Sun Mar 09, 2008 1:10 pm   Post subject: Re: Illegal picture ID number error

Dam that is easily overlooked(atleast by me), the filename shown by my Windows XP default setting omits the file type...It adds the file type as a label that says "JPEG".
I did not realize Turing only recoginizes short forms of file type acrynoms rather than full file type acrynom. Thats so smart of HoltSoft, this way I dont have type an extra letter for the file type name!
Thanks Saad.
Dan




PostPosted: Sun Mar 09, 2008 2:28 pm   Post subject: RE:Illegal picture ID number error

It's not about it being a short form of the file extension or not. A file's extension relay is just part of the files name, so level1.jpeg and level1.jpg could be completely different files. You also could have an image with no extension or a non standard one it would also work as long as you put in it's full name.

I recommend turning off "hide extensions for know file types" in xp when doing development work so you can see the real file names. This should be in the folder options some where.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
riveryu




PostPosted: Sun Mar 09, 2008 3:01 pm   Post subject: RE:Illegal picture ID number error

Earlier was just my frustration talking. Thanks for the advice.
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  [ 5 Posts ]
Jump to:   


Style:  
Search: