MediaFit
MediaFitOnlyBig
MediaCenter
|
Media/image fitting options:
- Enables fitting of images.
Works in Multimedia (both for images and for movies) and Plugins modes.
- Enables fitting of big images only.
Works in Multimedia (for images only) and Plugins modes.
- Enables centering of smaller images.
Works in Multimedia (for images only) and Plugins modes.
|
IsImage
IsIcon
IsMetafile
(public, read-only)
|
Flags which show what media type is loaded in Multimedia mode:
- IsImage: Image (any format).
- IsIcon: Image which is an icon (ICO).
- IsMetafile: Image which is a metafile (WMF, EMF).
Note:
- Images and media files are detected by file extension
using global variable ATViewerOptions.
See description of ModeDetect property for details.
|
ImageWidth
ImageHeight
ImageBPP
(public, read-only)
|
Image properties (when IsImage = True):
- Width.
- Height.
- Bits per pixel.
Notes:
- ImageBPP is supported for GIF, PNG, BMP, JPG (with IJL usage), GraphicEx types. Otherwise it is 0.
- ImageWidth, ImageHeight change when size effect is applied (ImageEffect method).
|
ImageColor
ImageDrag
ImageCursor
ImageDragCursor
ImageTransparent
ImageResample
ImageKeepPosition
|
Image control properties (when IsImage = True):
- ImageColor: Color of image background.
- ImageDrag: Enables dragging of large images by mouse.
- ImageCursor: Cursor of image object (default is crDefault).
- ImageDragCursor: Cursor used for image dragging (default is crSizeAll).
- ImageTransparent: Enables image transparency showing.
Affects only formats with transparency (GIF, PNG etc).
- ImageResample: Enables image resampling on scaling.
- ImageKeepPosition: Enables keeping of image view position
on image scaling and control resizing.
|
ImageScale (public) |
Current image scale in percents (%).
Notes:
- When MediaFit = False, this value is 100 initially;
when MediaFit = True, this value is affected by current control size.
- Changing of this property sets MediaFit to False.
- You can increase/decrease ImageScale in predefined row of values
using ImageScaleInc / ImageScaleDec methods.
|
ImageBox (public, read-only) |
Embedded imagebox object (of type TATImageBox, declared in ATImageBox.pas).
Note:
- Use this object to access advanced image-related properties,
such as image label caption/visibility, border size, scrollbars etc.
|
ImageError
ImageErrorMessage
(public, read-only)
ImageErrorMessageBox
|
Image error state (when IsImage = True):
- ImageError: True if image loading error occured.
- ImageErrorMessage: String describing the error.
- ImageErrorMessageBox: Enables to display messagebox when error occurs.
Note:
- When ImageErrorMessageBox = True, messagebox is displayed on image loading error
and you don't need to read ImageError/ImageErrorMessage properties.
When ImageErrorMessageBox = False, you should read these properties
and show error text inside image label, like in this example:
procedure TFormView.UpdateImageLabel;
begin
with ATViewer1 do
if IsImage and Assigned(ImageBox) then
if ImageError then
begin
ImageBox.ImageLabel.Visible := True;
ImageBox.ImageLabel.Caption := ImageErrorMessage;
ImageBox.ImageLabel.Font.Color := clRed;
end
else
begin
ImageBox.ImageLabel.Visible := FImageLabelVisibleFlag;
ImageBox.ImageLabel.Caption := Format(
'%d x %d (%d%%)',
[ImageWidth, ImageHeight, ImageScale]);
ImageBox.ImageLabel.Font.Color := clBlue;
end;
end;
|
IJLIntegration |
Options that allow to integrate IJL (Intel JPEG Library, ijl15.dll)
into Image mode.
This is record that contains the following fields:
- Enabled: Enables integration.
- ExtList: List (comma separated) of JPEG file extensions.
Notes:
- This property is available only when "IJL" define
is uncommented in ATViewerOptions.inc file.
- IJL is used when Enabled = True, and "ijl15.dll" file is present in %PATH%.
DLL is loaded dynamically.
|