Bitmap (PRIM_BMP)

Bitmap is an image file in the repository

Ancestors - Graphic (PRIM_FLBX)Object (PRIM_OBJT)


A Bitmap component can be used to store images files in the LANSA repository.
Originally limited to just BMP files, Bitmaps can also store JPG, JPEG and PNG files.
Once enrolled, these images can be used on buttons, list items and many other places in an application.
Enrolled images are easy to deploy as part of the application and are compiled in to the DLL generated for desktop components.
PRIM_BMP is an abstract class. The Sys_Appln.CreateBitmap  method can be used to create an instance at runtime.


In this example an image stored in a BLOB field is used to populate the image.
#Image.FileName := #Empimg
In this example a bitmap instance is created from a file.
Define_Com Class(#Prim_bmp) Name(#Bitmap) Reference(*Dynamic)
#Bitmap <= #Sys_Appln.CreateBitmap(#FilePath)


Name Description
BitsPerPixel Number of bits per pixel
ComponentClassName ComponentClassName is the name of the component's class. Inherited from Object (PRIM_OBJT)
ComponentMembers ComponentMembers provides access to all the member components of this component Inherited from Object (PRIM_OBJT)
ComponentPatternName ComponentPatternName is used to qualify the class of the component. Inherited from Object (PRIM_OBJT)
ComponentTag Generic space allowing a value to be stored for the instance Inherited from Object (PRIM_OBJT)
ComponentType ComponentType gives you access to the type information about the component Inherited from Object (PRIM_OBJT)
ComponentTypeName ComponentTypeName is the fully qualified name of the component's class. Inherited from Object (PRIM_OBJT)
CompressionType Image Compression Type
FileName FileName is used to specify an image file
Height Height of the image in pixels
ImageCount Number of images
ImageType Image Format
IsLoaded True when the bitmap source file has been loaded
MaskColor Color used to identify the background of the image
Name Name identifies the component Inherited from Object (PRIM_OBJT)
Owner Owner owns this component Inherited from Object (PRIM_OBJT)
Parent The component instance to which this instance is attached. The visual container for a control or the collector of a set of child instances Inherited from Object (PRIM_OBJT)
StandardImage Use on of the standard application images
UseMaskColor Use the mask color as the background
Width Width of the image in pixels


Name Description
CreateInstance CreateInstance is signalled when an instance of a component is created Inherited from Bitmap (PRIM_BMP)
DestroyInstance DestroyInstance is signalled when an instance of a component is about to be destroyed Inherited from Bitmap (PRIM_BMP)
Failed Fired if the image fails to load for any reason
Loaded Fired when the bitmap source has been loaded

See also

All Component Classes

Technical Reference

LANSA Version 15, April 2020