Ok, i have made progress and am now at the stage where i need to get the picture to display and dont know how to do so, can you please help me with this. My code goes as follows:
Graphics 640,480,32,2
SetBuffer BackBuffer()
filein=ReadFile("test2.tga")
;TGA File Header
Idlength=ReadByte( Filein )
ColorMapType=ReadByte( Filein )
imagetype=ReadByte( Filein )
;color map specifications
index=ReadShort( filein )
length=ReadShort( filein )
size=ReadByte( filein )
xorig=ReadShort( filein )
yorig=ReadShort( filein )
width=ReadShort( filein )
height=ReadShort( filein)
depth=ReadByte( filein )
attributes=ReadByte( filein )
Color 255,255,255
Print "ID Length: "+Idlength
Print "Color Map Type: "+ColorMapType
Print "Image Type: "+Imagetype
Print "Index: "+index
Print "Length: "+length
Print "Size: "+size
Print "XOrigin: "+xorig
Print "YOrigin: "+yorig
Print "Width: "+width
Print "Height: "+height
Print "Depth: "+depth
Print "attributes: "+attributes
WaitKey()
Graphics 640,480,32,2
SetBuffer BackBuffer()
filein=ReadFile("test2.tga")
;TGA File Header
Idlength=ReadByte( Filein )
ColorMapType=ReadByte( Filein )
imagetype=ReadByte( Filein )
;color map specifications
index=ReadShort( filein )
length=ReadShort( filein )
size=ReadByte( filein )
xorig=ReadShort( filein )
yorig=ReadShort( filein )
width=ReadShort( filein )
height=ReadShort( filein)
depth=ReadByte( filein )
attributes=ReadByte( filein )
Color 255,255,255
Print "ID Length: "+Idlength
Print "Color Map Type: "+ColorMapType
Print "Image Type: "+Imagetype
Print "Index: "+index
Print "Length: "+length
Print "Size: "+size
Print "XOrigin: "+xorig
Print "YOrigin: "+yorig
Print "Width: "+width
Print "Height: "+height
Print "Depth: "+depth
Print "attributes: "+attributes
WaitKey()