GIF images

Comments

as said by a file from my 8th grade comp sci teacher:

! The syntax for the Read_Image subroutine is as follows
!
! CALL Read_Image(sourcetype$,imagedata$,filename$)
!
! Parameters
! sourcetype$: This refers to the image format for the picture file. It is best to
! use JPEG images to conserve file space, but TrueBASIC also supports
! Bitmaps, PCX, and PICT files (PICT files on Mac only). This can be
! stored in string or simply use a constant as done in the example
! below. "JPEG", "MS BMP", "PCX", "PICT" are all acceptable constants
! imagedata$: This is the string variable you want to store the image information in.
! If many images are used in the program, you need to be concerned with
! memory as pictures. You can load the pictures into an array at the
! beginning of a program to speed the execution of the actual code, but
! you may find memory issues.
! filename#: The file you want to load. If the file is not in the same directory,
! you need to put the path to get to the file, otherwise just the file
! name, including the extension, is fine.
! The Box Show statement allows you to show the picture file on the screen once it is
! stored as a string using the Read_Image subroutine.
!
! Box Show imagedata$ at x,y
!
! Parameters
! imagedata$: The string variable in which you stored the image data
!
! x,y: The bottom left corner of the area in which you want to show the image. The original
! window uses a 0 to 1 range for x and y values. You may use the SET WINDOW command
! to change to range in values for x and y.
!
! The larger the gap between positions, the more of a chance the picture will leave a trail.
! If a trail is left, it will be necessary to erase the picture before showing it again at a new
! location by drawing a white rectangle over the old image or BOX KEEPing the background before
! showing the image and BOX SHOWing the background back over the picture before showing the next
! frame.

Example:

CALL Read_Image ("JPEG", car$,"car.jpg")
let x = .45
let y = .45
Box Show car$ at x,y

*now my words*
in other words, sorry no, but i hope this helps you and other users

calling images

I know for sure you can call .JPG and .BMP files

jpeg

CALL Read_Image(sourcetype$,imagedata$,filename$)

BMP

CALL read_image ("MS BMP",STRING$, "FILE_NAME.bmp")

Its probably possible to call .GIF images But they probably wont be animated.

mabe

that may or may not be true, gif images are differently formatted that the ones listed, sure, i might allow you to use them without animation, but i wouldn't count on it

Image formats

Sorry folks. The only image formats supported by the built in sub-routine CALL ReadImage are JPEG and MS BMP.
GIF is not supported.

By the way, for smooth animation it is possible to read images direct from your hard drive and display them provided the images are in BOX string format. If you read jpg or bmp files and then convert them before dispalying, then the resulting animation is jerky because of the delay in converting the images.

Big John