[Overview][Types][Classes][Procedures and functions][Index] | Reference for unit 'ExtCtrls' (#lcl)

# TImage

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Implements a graphic image placed on a form, and usually loaded from a picture file.

## Declaration

Source position: extctrls.pp line 612

`type TImage = class(TCustomImage)`
`published`
`property AntialiasingMode: TAntialiasingMode;` |  | Indicates if anti-aliasing is used when rendering the image.
`property Align: TAlign;` |  | Specifies the placement of the control on its Parent control.
`property Anchors: TAnchors;` |  | The set of anchor definitions for this control.
`property AutoSize: Boolean;` |  | Allows automatic adjustment of the size for the control, according to its content.
`property BorderSpacing: TControlBorderSpacing;` |  | Determines the inner and outer border spacing for this control.
`property Center: Boolean;` |  | Indicates if the image should be centered.
`property KeepOriginXWhenClipped: Boolean;` |  | Preserves the Left coordinate when a clipped image is centered.
`property KeepOriginYWhenClipped: Boolean;` |  | Preserves the Top coordinate when a clipped image is centered.
`property Constraints: TSizeConstraints;` |  | Contains the minimum and maximum Width and Height for the control.
`property DragCursor: TCursor;` |  | The cursor shape shown during a drag operation.
`property DragMode: TDragMode;` |  | Determines how a drag operation is started for the control.
`property Enabled: Boolean;` |  | Determines whether the control responds to mouse or keyboard input.
`property ImageIndex: Integer;`
`property ImageWidth: Integer;`
`property Images: TCustomImageList;`
`property ParentShowHint: Boolean;` |  | If True, the value of ShowHint for the control will be the same as the one from the Parent. Default is True.
`property Picture: TPicture;` |  | Contains the image displayed in the control.
`property PopupMenu: TPopupMenu;` |  | A context-sensitive menu that pops up when the right mouse button is clicked over this control.
`property Proportional: Boolean;` |  | True if image is proportional.
`property ShowHint: Boolean;` |  | Enables Hint display for the control.
`property Stretch: Boolean;` |  | Indicates if the image is resized to the client area for the control.
`property StretchOutEnabled: Boolean;` |  | Allows the image to be resized proportionally when the image drawing area is expanded.
`property StretchInEnabled: Boolean;` |  | Allows the image to be resized proportionally when the image drawing area is shrunk.
`property Transparent: Boolean;` |  | Indicates if the image has a clear, non-opaque background.
`property Visible: Boolean;` |  | Allows the control, and all of its children, to be displayed or hidden.
`property OnChangeBounds: TNotifyEvent;` |  | Event handler signalled when the Bounds for the control have been changed.
`property OnClick: TNotifyEvent;` |  | Notification handler for mouse clicks.
`property OnContextPopup: TContextPopupEvent;` |  | Invoked when a context-sensitive pop-up menu is requested.
`property OnDblClick: TNotifyEvent;` |  | Event handler signalled when a mouse double click occurs in the control.
`property OnDragDrop: TDragDropEvent;` |  | Event handler signalled when an object is dropped onto the control.
`property OnDragOver: TDragOverEvent;` |  | Event handler signalled when a control is dragged over the control instance.
`property OnEndDrag: TEndDragEvent;` |  | Event handler signalled for the end of a drag-drop operation.
`property OnMouseDown: TMouseEvent;` |  | Event handler signalled when a mouse down event is handled for the control.
`property OnMouseEnter: TNotifyEvent;` |  | Event handler signalled when the mouse pointer has entered the control.
`property OnMouseLeave: TNotifyEvent;` |  | Event handler signalled when the mouse pointer has left the control.
`property OnMouseMove: TMouseMoveEvent;` |  | Event handler signalled when the mouse pointer is moved in the control.
`property OnMouseUp: TMouseEvent;` |  | Event handler signalled when a mouse up event is handled for the control.
`property OnMouseWheel: TMouseWheelEvent;` |  | Event handler for mouse wheel turned.
`property OnMouseWheelDown: TMouseWheelUpDownEvent;` |  | Event handler signalled for a downward movement of the mouse wheel.
`property OnMouseWheelUp: TMouseWheelUpDownEvent;` |  | Event handler signalled for an upward movement of the mouse wheel.
`property OnMouseWheelHorz: TMouseWheelEvent;` |  | Event handler signalled for a horizontal movement of the mouse wheel.
`property OnMouseWheelLeft: TMouseWheelUpDownEvent;` |  | Event handler signalled for a leftward movement of the mouse wheel.
`property OnMouseWheelRight: TMouseWheelUpDownEvent;` |  | Event handler signalled for a rightward movement of the mouse wheel.
`property OnPaint: TNotifyEvent;` |  | Event handler signalled to paint the control.
`property OnPictureChanged: TNotifyEvent;` |  | Event handler signalled when Picture is changed.
`property OnPaintBackground: TImagePaintBackgroundEvent;` |  | Event handler signalled to draw the background for the image.
`property OnResize: TNotifyEvent;` |  | Notification handler for a resize of the control.
`property OnStartDrag: TStartDragEvent;` |  | Event handler signalled for the start of a dragging operation.
`end;`

## Inheritance

`TImage` |  | Implements a graphic image placed on a form, and usually loaded from a picture file.
`TCustomImage` |  | Implements the base class for TImage.
`TGraphicControl` |  | TGraphicControl is the base class for all lightweight controls.
`TControl` |  | The base class for visible controls.
`TLCLComponent` |  | The base class for LCL components which have an associated widget.
`TComponent`
?
`TObject`

## Description

TImage is a TCustomImage descendent which implements a lightweight and fast class used to display a graphic image using one of the image formats supported in the LCL. This includes:

- Bitmap
- Pixmap
- PNG
- JPEG
- GIF
- TIFF
- Icon

Use the Picture property to assign, load or save an image using one of the supported formats.

Use the Canvas property to render the graphic image in Picture, or to perform custom drawing operations.

Use properties in the class instance to control how the image is rendered, including: AntialiasingMode, Center, Stretch, Transparent, and Proportional.

TImage inherits most of its properties from its ancestors, TCustomImage, TGraphicControl and TControl

Use TImageList when a list of images with scaling capabilities is needed.

## See also

TImage |  | Implements a graphic image placed on a form, and usually loaded from a picture file.
TGraphicControl |  | TGraphicControl is the base class for all lightweight controls.
TPicture |  | Implements a container for TGraphic and descendent classes.
TGraphic |  | Abstract base class used for images in supported image formats.
TCanvas |  | Implements a drawing surface for a visual control or bitmap image.
TImageList |  | Implements a multi-resolution container for images used in an application.