loadImage


function loadImage(resource: string): image

Loads the image from the resource and returns an 'image' object. To access the file inside the JAR archive (the file added as a resource into the MIDletPascal project), the 'resource' parameter must begin with '/' character. If the resource name is invalid, the application will fail.

  begin
    drawImage(loadImage('/icon.png'), 0, 0);
    repaint;
    delay(1000); { wait 1 second before the MIDlet terminates }
  end.

See also: drawImage, getImageWidth, getImageHeight