Problem Opening JPEGS

I am trying to open a JPEG and don't know where to put the path statement of where to find the JPEG.
Code:

LET x=.5
LET y=.5
CALL Read_image("JPEG",image$,"test.jpg")
BOX SHOW image$ at x,y

Thank you,
R.A.J

Comments

re: path name

The path name goes with the file name--see example.

CALL Read_image("JPEG",image$,"C:\graphics\test.jpg")

If you want to get more sophisticated, you can determine exactly where your program is running from with:

Library "truectrl.trc"

DIM vals(6)
CALL TC_Init
CALL tc_getsysinfo("APPLICATION NAME",FULLPATH$,VALS())
FOR N = LEN(FULLPATH$) TO 1 STEP -1
IF FULLPATH$[N:N] = "\" THEN
LET DIR$ = FULLPATH$[1:N]
EXIT FOR
END IF
NEXT N

Where dir$ will be the full path of where the executable resides (in the case where someone has installed your program package on their computer). If you then want to refer to a graphics folder the coexists with the executable

Let gdir$ = dir$&"graphics\"

will give the full path name to your graphics directory (cleverly named 'graphics' in this example).

Now your call would be

CALL Read_image("JPEG",image$,gdir$&"test.jpg")

During development and running from the editor insert a

let dir$ = ""

statement just before the

Let gdir$ = dir$&"graphics\"

statement and you can write and test at will. When ready to compile and bind, just comment out the

Let dir$ = ""

statement.

More than what you wanted, but maybe reference for later.

rwt