with Ada.Streams; use Ada.Streams;
with Allegro.Bitmaps; use Allegro.Bitmaps;
package Resources.Images is
-- Returns True if the given format is supported. The format string is the
-- image format file extension without a leading dot character.
function Is_Format_Supported( format : String ) return Boolean;
-- Loads the an image of the given format from a memory block. The format
-- string is the image format file extension without a leading dot character.
-- An exception is raised on error.
function Load_From_Memory( format : String;
data : not null access Stream_Element_Array
) return A_Bitmap;
-- Loads an image from resource file 'resource', if it's not null and of a
-- supported image format. The filename of 'resource' will be used to
-- determine the file format. If an image can't beloaded then null will be
-- returned.
function Load_Image( resource : A_Resource_File ) return A_Bitmap;
-- Loads an image from 'filepath', if it's of a supported image format.
-- If 'filename' is relative, it will be searched for according to the
-- standard rules for finding a resource. (See Resources.Load_Resource)
-- If the image can't beloaded then null will be returned.
function Load_Image( filepath : String; group : String ) return A_Bitmap;
end Resources.Images;