1. with Ada.Streams;                       use Ada.Streams; 
  2. with Allegro.Bitmaps;                   use Allegro.Bitmaps; 
  3.  
  4. package Resources.Images is 
  5.  
  6.     -- Returns True if the given format is supported. The format string is the 
  7.     -- image format file extension without a leading dot character. 
  8.     function Is_Format_Supported( format : String ) return Boolean; 
  9.  
  10.     -- Loads the an image of the given format from a memory block. The format 
  11.     -- string is the image format file extension without a leading dot character. 
  12.     -- An exception is raised on error. 
  13.     function Load_From_Memory( format : String; 
  14.                                data   : not null access Stream_Element_Array 
  15.                              ) return A_Bitmap; 
  16.  
  17.     -- Loads an image from resource file 'resource', if it's not null and of a 
  18.     -- supported image format. The filename of 'resource' will be used to 
  19.     -- determine the file format. If an image can't beloaded then null will be 
  20.     -- returned. 
  21.     function Load_Image( resource : A_Resource_File ) return A_Bitmap; 
  22.  
  23. end Resources.Images;