'JPEG loader by Antoni Gual, Adapted to FB0.17 by Luke Landriaut
#include "jpeg4fb.bas"

'jpeg4fb_test.bas

Screen 19,32
Dim As Double t=Timer 
jpeg2screen("Volta.jpg")
t=Timer-t 
If jpegerr Then 
  Print printerror
Else
  Windowtitle (" displayed in "& t &" seconds")
End If
sleep


Dim As Integer hoch, breit, components, fmt 'damit fragen wir die Grafikgröße ab
jpegframesize("Flieger.jpg", breit, hoch, components,fmt)

screenres breit, hoch+40, 32
If Err Then Print "Can't set screen mode" : Sleep : End

Print "Breite : "; breit; " Pixel"
Print "Hoehe  : "; hoch;  " Pixel"
Dim bild As Any Ptr

t=Timer
bild = jpegget("Flieger.jpg",0,0,breit-1,hoch-1)
t=Timer-t
If jpegerr Then 
  Print printerror
Else
  Windowtitle (" displayed in "& t &" seconds")
End If
Put (0,40),bild,pset

If bild <> 0 Then imagedestroy bild
Sleep

