ImageEn, unit iemview

TImageEnMView

Properties · Methods · Events · Demos · Examples

Declaration

TImageEnMView = class(TIECustomMView);


Description

The TImageEnMView is a display component for multiple images (frames of a video or multiple image format, like GIF, or thumbnails of images, e.g. images in a folder).
It embeds a multiple image container, TIEMultiBitmap (IEMBitmap property), and can display images in two ways:
As a grid of thumbnails (similar to a thumbnail view in Windows Explorer)
As a single frame of a multiple-frame image (such as a GIF, AVI or TIFF). This can also be animated.


TImageEnMView encapsulates a TImageEnMIO (MIO property) for loading, saving, acquisition and printing, and a TImageEnProc (Proc property) for editing of the selected image.
Frames can be loaded and saved from multiple image formats like GIF, TIFF, AVI, DCX, DICOM and ICO. It can also load from CUR and ZIP formats, and save to PDF and PS format (loading of PDF is supported if a relevant plug-in is installed).

The images can be stored as full images, as thumbnails (a sub-resampled image of the original), loaded only as they are displayed (you need only specify the file name), or upon request (an event is generated whenever an image needs to be shown).
Thumbnails for video formats are retrieved from Windows Explorer. This can be disabled or expanded by setting MViewExplorerThumbnailExts.

For rapid UI development a full set of actions is also available.

There are two descendent components of TImageEnMView:

TImageEnMView supports VCL Theming:



Overview

       



Display Styles

TImageEnMView offers five standard styles. Ensure you set AutoAdjustStyle := True; so that setting the style automatically updates all relevant properties.
iemsFlat iemsFlatAndWide
iemsFilenames iemsColumns


Thumbnail Performance

Because a TImageEnMView may potentially load and store thousands of files, you should optimize your settings to ensure the best performance. Take note of the following:


Recommended Defaults

For compatibility, some of the default options of TImageEnMView are not the recommended ones. Here are some suggested changes:


Keyboard Shortcuts

The following keyboard shortcuts are supported:
Description Shortcut Option to Enable
Navigate   Cursor Keys mkiMoveSelected
Select multiple files   Ctrl/Shift+Cursor Keys mkiMoveSelected
Select next filename starting with a letter   Numbers and letters mkiLetterNavigation
Select all files Ctrl+A mkiMoveSelected
Note: Configure or disable individual keyboard shortcuts using KeyboardShortcuts


Debugging Visualizer

You can view the content of a TImageEnMView while debugging by hovering over the object and clicking the Inspect button:


Demos


Demo Description Demo Project Folder Compiled Demo
ImageEnMView Actions Multiple Image and thumbnail application built using only ImageEnMView actions Actions\Actions_MView\MViewActions.dpr   
Contact Sheets Output thumbnail pages to file, bitmap or printer Multi\ContactSheets\ContactSheets.dpr   
Create Transition Frames Inserting transition frames into a TImageEnMView or saving them to file Multi\CreateTransitionFrames\CreateTransitionFrames.dpr   
Custom Draw on Thumbnail Custom drawing of checkboxes onto thumbnails Multi\CustomThumbs2\CustomThumbs2.dpr   
Custom Draw Thumb Background Show thumbnails for images in a folder with custom drawn background Multi\CustomThumbs\Thumbs.dpr   
Dragging between TImageEnMViews Dragging of images between multiple TImageEnMView Multi\DragDrop_MultiView\TImageEnMView_DD.dpr   
Dragging from TImageEnMView Extracting images from multiple-image files (such as TIFF, GIF, etc.) using drag and drop Multi\DragDrop_FileList_2\TImageEnMView_FileList.dpr   
Dragging to TImageEnMView Adding images to a TImageEnMView using drag and drop Multi\DragDrop_FileList_1\FileList_TImageEnMView.dpr   
Dragging within TImageEnMView Dragging of images within a TImageEnMView Multi\DragDrop_MultiView2\Multiview2.dpr   
ImageEnMView Filtering Hiding thumbnails from display based on filename and other properties Multi\Filtering\Filtering.dpr   
ImageEnMView Styles Changing styles and display modes of a TImageEnMView Multi\MViewStyles\MViewStyles.dpr   
ImageEnMView Preview Using a TImageEnMView with a TImageEnView for previewing and navigation Multi\MViewPreview\MViewPreview.dpr   
ImageEnMView with Viewer Attaching a TImageEnView to a TImageEnMView for previewing and navigation Multi\MView_AttachedViewer\MViewPreview.dpr   
OnDemand Loading Load Windows stock icons as they are displayed in a TImageEnMView using OnImageIDRequestEx Multi\Multi-OnDemand\MViewOnRequest.dpr   
Performance Features Overview of TImageEnMView options that improve performance Multi\MViewPerformance\Performance.dpr   
Print Multiview Frame Print the selected frame of a multiple-image file such as AVI, TIFF and GIF Multi\Multiview_PrintFrame\Multiview.dpr   
Thumbnail Buttons Adding buttons to each of your thumbnails Multi\ThumbButtons\ThumbButtons.dpr   
Thumbnail Viewer Using TImageEnMView to show thumbnails for images in a folder Multi\Thumbnails\Thumbs.dpr   
Thumbnails with Checkboxes Using Checkboxes to select thumbnails Multi\Checkboxes\Checkboxes.dpr   
Styled Thumbnails Show thumbnails with preset styles Multi\Thumbnails2\Thumbs.dpr   
View All Frames Use TImageEnMView to view frames and animate multiple-image files such as AVI, TIFF and GIF Multi\Multiview\Multi.dpr   
View Meta-data Annotations Display Wang annotations and ImageEn layers from the meta-data of images in TImageEnMView and TImageEnView Multi\Multiview2\Multiview2.dpr   
Large TIFF Viewer and Editor Edit and view pages of very large TIFF files using TIETIFFHandler and TImageEnMView InputOutput\TiffHandler2\TiffHandler2.dpr   
"Coverflow" Effect Demo of "Coverflow" style effect using a TImageEnMView Display\MViewFlow\MViewFlow.dpr   
Morphing Morphing of two images ImageEditing\Morphing\Morphing.dpr   
Mouse Wheel Params The effect of the TImageEnView and TImageEnMView MouseWheelParams properties Other\MouseWheel\MouseWheelParams.dpr   

Examples


procedure TForm1.FormCreate(Sender: TObject);
begin
  // Setup TImageEnMView
  ImageEnMView1.SetModernStyling(False);         // Update to the most modern styling
  ImageEnMView1.AutoAdjustStyle   := True;       // Enable so that setting "Style" will automatically update all relevant properties
  ImageEnMView1.GridWidth         := -1;         // Automatically adjust the column count to match the control width
  ImageEnMView1.ThumbWidth        := 150;        // Increase size of thumbnails
  ImageEnMView1.ThumbHeight       := 130;        // Increase size of thumbnails
  ImageEnMView1.EnableMultiSelect := true;       // Enable selection of multiple files
  ImageEnMView1.StoreType         := ietThumb;   // Normally don't need to store whole image in memory, just a sub-sampled thumbnail
end;

// Now display the images of a folder in the grid
ImageEnMView1.FillFromDirectory('C:\MyImages\', -1, False, '', False, '', True);

// Create an animated GIF file from ten source images
ImageEnMView1.Clear;
for i := 0 to 9 do
begin
  ImageEnMView1.AppendImage( format( 'D:\Source\Frame %d.bmp', [i] ));
  ImageEnMView1.MIO.Params[i].GIF_DelayTime := 10; // Display each frame for 1/10th of a second
end;
ImageEnMView1.MIO.SaveToFileGIF( 'D:\Animated.gif' );

Methods and Properties


Embedded Components
Public Property  IEMBitmap (Container for images)
Public Property  Proc (Image editing and analysis methods)
Public Property  MIO (Loading, saving, acquisition and printing)

Display
Public Property  Animation
Public Property  AnnotationsVisible
Published Property  AttachedImageEnView
Published Property  AutoAdjustStyle
Published Property  Background
Published Property  BackgroundColor2
Published Property  BackgroundStyle
Published Property  BiDiMode
Public Method  CenterSelected
Public Property  DefaultFileIcon
Public Method  DisplayImageAt
Published Property  Filter
Published Property  FilterField
Public Property  FilteredCount
Public Method  GetUnfilteredImage
Published Property  GradientDir
Published Property  GradientEndColor
Published Property  GridWidth (Column count)
Public Method  LockPaint
Public Property  LockPaintCount
Public Method  LockUpdate
Public Property  LockUpdateCount
Public Property  MaximumViewX
Public Property  MaximumViewY
Public Property  MissingFileIcon
Public Method  SetChessboardStyle
Public Method  SetModernStyling
Public Method  SetStyleEx
Public Method  SetViewXY
Published Property  Style
Public Method  UnlockPaint
Public Method  UnlockUpdate
Public Property  ViewX
Public Property  ViewY
Published Property  Wallpaper
Published Property  WallpaperStyle

Editing
Public Method  AppendImage
Public Method  AppendSplit
Public Method  Assign
Public Method  AssignEx
Public Method  AssignTo
Public Method  Clear
Public Method  CreateMorphingSequence
Public Method  DeleteImage
Public Property  ImageCount
Public Method  InsertImageEx
Public Method  InsertImage
Public Method  InsertTransitionFrames
Public Method  MoveImage
Public Method  RemoveBlankPages
Public Method  RemoveDuplicates
Public Method  Sort

Image Access
Public Method  CopyToIEBitmap
Public Method  GetBitmap
Public Method  GetTIEBitmap
Public Property  IEBitmap
Public Method  PrepareSpaceFor
Public Method  ReleaseBitmap
Public Method  SetImage
Public Method  SetImageEx
Public Method  SetImageRect
Public Method  UpdateImage

Image Information
Public Method  FilenameToIndex
Public Property  ImageBackground
Public Property  ImageBitCount
Public Property  ImageCol
Public Property  ImageCreateDate
Public Property  ImageDelayTime
Public Property  ImageEditDate
Public Property  ImageFileName
Public Property  ImageFileSize
Public Property  ImageFileType
Public Property  ImageFiltered
Public Method  ImageGetDisplayText
Public Property  ImageHeight
Public Property  ImageID
Public Property  ImageOriginalHeight
Public Property  ImageOriginalWidth
Public Property  ImageRow
Public Property  ImageTag
Public Property  ImageUserPointer
Public Property  ImageWidth
Public Property  ImageX
Public Property  ImageY

Image Text
Published Property  BottomTextFont
Published Property  DefaultBottomText
Published Property  DefaultInfoText
Published Property  DefaultTopText
Public Property  ImageBottomText
Public Property  ImageInfoText
Public Property  ImageTopText
Published Property  InfoTextFont
Published Property  ParentFont
Published Property  ReadOnly
Published Property  SelectedFontColor
Public Method  SetAllText
Public Property  ShowText
Public Property  TextBackgroundColor
Public Property  TextBackgroundStyle
Public Property  TextBlockWidth
Public Property  TextColumns
Public Property  TextColumnWidths
Published Property  TextMargin
Published Property  TextTruncSide
Published Property  TopTextFont

Thumbnail Appearance
Published Property  EnableAlphaChannel
Public Property  FillThumbnail (Highlight Selection)
Public Property  IconSize
Public Method  SetThumbnailSize
Published Property  ShowThumbnailHint
Public Property  SoftShadow
Published Property  ThumbnailClipping
Published Property  ThumbnailDisplayFilter
Public Property  ThumbnailFrameRect
Public Property  ThumbnailFrameSelected
Public Property  ThumbnailFrame
Published Property  ThumbHeight
Published Property  ThumbnailResampleFilter
Published Property  ThumbnailsBackground
Published Property  ThumbnailsBackgroundHover
Published Property  ThumbnailsBackgroundSelected
Published Property  ThumbnailsBackgroundStyle
Published Property  ThumbnailsBorderColor
Published Property  ThumbnailsBorderCurved
Published Property  ThumbnailsBorderWidth
Published Property  ThumbnailsInternalBorderColor
Published Property  ThumbnailsInternalBorder
Published Property  ThumbnailOptionsEx
Public Property  ThumbsRounded
Public Method  ThumbSizeInfo
Published Property  ThumbWidth
Published Property  Zoom

Thumbnail Spacing
Published Property  BottomGap
Published Property  HorizBorder
Published Property  LeftGap
Published Property  OuterMargin
Published Property  RightGap
Published Property  UpperGap
Published Property  VertBorder

Input/Output
Public Method  ClearImageCache
Published Property  DiskCache
Public Property  DeprioritizeLargeImages
Public Property  DeprioritizeLargeImageMethod
Public Property  EnableAdjustOrientation (Auto-Rotate)
Public Property  EnableImageCaching
Public Property  EnableLoadEXIFThumbnails
Public Property  EnableLoadExplorerThumbnails
Public Method  EnsureImageLoaded
Public Method  FillFromDirectory
Public Method  FillFromList
Public Method  FillFromZip
Public Method  GetImageToFile
Public Method  GetImageToStream
Published Property  ImageCacheSize
Public Property  ImageCacheUseDisk
Published Property  IOOptionsEx
Public Property  JobsRunning
Public Property  JobsWaiting
Public Method  LoadFromFileOnDemand
Public Method  LoadSnapshot
Public Property  LookAhead
Public Property  MaintainInvisibleImages
Public Method  ReloadImage
Public Method  SaveSnapshot
Public Method  Seek
Public Method  SetImageFromFile
Public Method  SetImageFromStream
Published Property  ThreadPoolSize
Public Property  WicFastLoading

Selections
Public Method  BeginSelectImages
Public Property  CheckThumbBoundsOnSelect
Public Method  DeleteSelectedImages
Public Method  Deselect
Published Property  EnableMultiSelect
Public Method  EndSelectImages
Published Property  HideSelectionOnDefocus
Public Method  IsSelected
Public Method  MoveSelectedImagesTo
Public Property  MultiSelectedImages
Public Property  MultiSelectedImagesCount
Public Property  MultiSelectedImagesList
Public Property  MultiSelecting
Published Property  MultiSelectionOptions
Public Method  SelectAll
Public Property  SelectedFilename
Public Method  SelectedFilenames
Public Property  SelectedImage
Public Property  SelectedImageAlwaysVisible
Published Property  SelectionColor
Published Property  SelectionWidth
Public Method  SelectSeek
Published Property  VisibleSelection

Checkboxes
Published Property  Checkboxes
Public Property  Checked
Public Method  CheckedCount
Public Property  CheckboxPos
Public Method  SetCheckboxParams
Public Method  CheckAll
Public Method  UncheckAll

User Interaction
Public Property  Gestures
Public Method  GetImageVisibility
Public Method  ImageAtGridPos
Public Method  ImageAtPos
Public Method  InsertingPoint
Public Method  IsVisible
Published Property  KeyInteract
Published Property  MouseInteract
Published Property  MouseWheelParams (Default)
Published Property  MouseWheelParamsAlt (Ctrl Key)
Published Property  PopupMenus

ScrollBars
Public Property  CurrentScrollBars
Public Property  HScrollBarParams
Published Property  ScrollBars
Public Property  ScrollBarsAlwaysVisible
Public Property  VScrollBarParams

Single Frame View
Public Method  CenterFrame
Published Property  DisplayMode
Public Property  Playing
Public Property  PlayLoop
Public Property  PlaySpeed
Published Property  TransitionDuration
Published Property  TransitionEffect
Published Property  TransitionParams
Public Property  TransitionRunning
Public Property  VisibleFrame

Other
Public Method  AddThumbButtons
Public Method  AssignLayers
Public Method  AssignPDFDocument
Public Method  CalcGridHeight
Public Method  CalcGridWidth
Published Property  DesignTimeView
Published Property  DrawVersion
Public Property  HighlightColor
Public Method  IEBeginDrag
Public Method  IEEndDrag
Published Property  ImageEnVersion
Public Method  LoadProperties
Public Property  ProgressTask
Public Method  SaveProperties
Public Method  SetExternalMBitmap
Published Property  StoreType
Public Method  Update

Events


User Interaction Events
Event  OnActionExecute
Event  OnCheckboxClick
Event  OnEditText
Event  OnImageDeselect
Event  OnImageSelect
Event  OnImageEnGesture
Event  OnSelectionChanging
Event  OnSelectionChanged
Event  OnZoomIn
Event  OnZoomOut

Loading Events
Event  OnAllDisplayed
Event  OnGetLoadFilename
Event  OnImageIDRequestEx
Event  OnImageIDRequest
Event  OnImageLoaded
Event  OnIOProgress
Event  OnWrongImage

Paint Events
Event  OnAnimationText
Event  OnBeforeImageDrawEx
Event  OnBeforeImageDraw
Event  OnDrawProgress
Event  OnDrawCanvas
Event  OnGetColors
Event  OnGetText
Event  OnGetTextEx
Event  OnImageDraw
Event  OnImageDraw2
Event  OnImageOut
Event  OnPaint

Other Events
Event  OnAcquireBitmap
Event  OnAfterEvent
Event  OnChanged
Event  OnChangedEx
Event  OnCreateImage
Event  OnCreateParams
Event  OnDestroyImage
Event  OnFilter
Event  OnFinishWork
Event  OnGetHint
Event  OnImageAdd
Event  OnImageAdded
Event  OnImageAtPos
Event  OnPlayFrame
Event  OnPrintPage
Event  OnProgress
Event  OnShowDialog
Event  OnShowCheckbox
Event  OnUndoRedo
Event  OnViewChange
Event  OnViewChanging