
-----------------------------------
bijx
Sun Mar 16, 2014 6:46 pm

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)[/code]

I'm using version 4.1.2

-----------------------------------
Insectoid
Sun Mar 16, 2014 7:01 pm

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
Sun Mar 16, 2014 7:13 pm

Re: RE:HELP - Illegal picture ID number \'0\'. (Probable cause: picture was not successfully created.).
-----------------------------------
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
Sun Mar 16, 2014 7:30 pm

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
Sun Mar 16, 2014 10:31 pm

RE:HELP - Illegal picture ID number \'0\'. (Probable cause: picture was not successfully created.).
-----------------------------------
alternatively: "hello.jpeg"

Check out the documentation for [tdoc]Dir.Open[/tdoc] -- it has an example for printing names of everything in a directory.
