Index

Package: Images

Description

package Resources.Images is
Copyright (c) 2012 Kevin Wellwood All rights reserved. This source code is distributed under the Modified BSD License. For terms and conditions, see license.txt.

Subprograms & Entries

Is_Format_Supported

function Is_Format_Supported
( format: String ) return Boolean;
Returns True if the given format is supported. The format string is the image format file extension without a leading dot character.

Load_Image

function Load_Image
( format: String;
data: not null access Stream_Element_Array ) return A_Allegro_Bitmap;
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. Raises a RESOURCE_FORMAT_ERROR on error.

Load_Image

function Load_Image
( resource: A_Resource_File ) return A_Allegro_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. Raises a RESOURCE_FORMAT_ERROR on error.

Load_Image

function Load_Image
( filepath: String;
group: String ) return A_Allegro_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) Raises a RESOURCE_ERROR on file not found, and RESOURCE_FORMAT_ERROR on file load error.