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

Username:   Password: 
 RegisterRegister   
 HELP - Illegal picture ID number '0'. (Probable cause: picture was not successfully created.).
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
bijx




PostPosted: Sun Mar 16, 2014 6:46 pm   Post subject: HELP - Illegal picture ID number '0'. (Probable cause: picture was not successfully created.).

I am trying to import a jpg picture into a test program with the Pic.FileNew command but it always gives me this error:

Illegal picture ID number '0'. (Probable cause: picture was not successfully created.).

I've read other threads with this problem and people keep saying use Pic.Free. I looked it up but i still have no idea what to do with it. This is the code:

code:
var pic:int:=Pic.FileNew("hello.jpg")

Pic.Draw(pic,100,100,0)


I'm using version 4.1.2
Sponsor
Sponsor
Sponsor
sponsor
Insectoid




PostPosted: Sun Mar 16, 2014 7:01 pm   Post subject: RE:HELP - Illegal picture ID number \'0\'. (Probable cause: picture was not successfully created.).

Is the picture in the same folder as your code?
bijx




PostPosted: Sun Mar 16, 2014 7:13 pm   Post subject: Re: RE:HELP - Illegal picture ID number \'0\'. (Probable cause: picture was not successfully created.).

Insectoid @ Sun Mar 16, 2014 7:01 pm wrote:
Is the picture in the same folder as your code?


Yes i did, i tried it in the same folder as the file save, and as the program. :/
Insectoid




PostPosted: Sun Mar 16, 2014 7:30 pm   Post subject: RE:HELP - Illegal picture ID number \'0\'. (Probable cause: picture was not successfully created.).

Is it possible that your image is actually named 'hello.jpg.jpg'? This actually happens a lot when the operating system hides the extension.
Tony




PostPosted: Sun Mar 16, 2014 10:31 pm   Post subject: RE:HELP - Illegal picture ID number \'0\'. (Probable cause: picture was not successfully created.).

alternatively: "hello.jpeg"

Check out the documentation for Dir.Open -- it has an example for printing names of everything in a directory.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
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: