ImageEn, unit iemview

TImageEnMView

TImageEnMView


Description


The TImageEnMView component is similar to a TImageEnView, but is designed for multiple images:
- Multiple images can be displayed in a grid (similar to a thumbnail view in Windows Explorer)
- A single frame of a multiple-frame image (such as a GIF, AVI or TIFF) can be displayed. This can also be animated.




ImageEn supports loading and saving multiple frames from GIF, TIFF, AVI, DCX, DICOM and ICO formats. It can also load from CUR format, 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 when 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:
- TImageEnFolderMView: For displaying images in a folder
- TImageEnLayerMView: For displaying layers of an image

Note: Do not attach a TImageEnIO component to TImageEnMView. Only the TImageEnMIO component can be attached to a TImageEnMView component, or you can use embedded MIO object.


Overview


        



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:

Most importantly, decide whether to load and store full size images, or just preview thumbnails. If you are loading the content of a multi-page file, such as TIFF, for editing and display, then generally you will want StoreType=ietNormal. However, if you are displaying thousands of photos from a folder, for example, then you are better to use load only thumbnails (StoreType is ietThumb or ietFastThumb)
Load images only on demand (i.e. as they are displayed or needed). To do this, ensure the LoadOnDemand parameter is set for AppendImage, InsertImage, FillFromDirectory or FillFromList. Or if you are just loading a single file with many pages, use LoadFromFileOnDemand
Lock updating while performing batch operations (LockUpdate/UnlockUpdate)
Consider options to load EXIF thumbnails or Windows Explorer thumbnails
Choose a good balance between quality and speed when setting the ThumbnailResampleFilter
Increasing the size of the image cache can help with general performance, especially if you are using StoreType=ietFastThumb


Demos


  Demos\Multi\...
  Demos\Actions\Actions_MView\MViewActions.dpr



Example


// In FormCreate()
with ImageEnMView1 do
begin
  // Update to the most modern styling
  SetModernStyling(False);

  ThumbWidth := 140; // Better size for thumbnails
  ThumbHeight := 150;

  BorderStyle := bsNone; // Normally don't require a 3D border

  StoreType := ietThumb; // 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);


Methods and Properties


Embedded Components
  Proc (Image editing and analysis methods)
  MIO (Loading, saving, acquisition and printing)


Display
  Animation
  AnnotationsVisible
  AutoAdjustStyle
  Background
  BackgroundStyle
  BiDiMode
  CenterFrame
  DefaultFileIcon
  DisplayImageAt
  GradientEndColor
  GridWidth (Column count)
  LockPaint
  LockPaintCount
  LockUpdate
  LockUpdateCount
  MaximumViewX
  MaximumViewY
  MissingFileIcon
  SetChessboardStyle
  SetModernStyling
  SetStyleEx
  SetViewXY
  Style
  UnlockPaint
  UnlockUpdate
  ViewX
  ViewY
  Wallpaper
  WallpaperStyle


Editing
  Assign
  AssignEx
  AppendImage
  AppendSplit
  Clear
  CreateMorphingSequence
  DeleteImage
  ImageCount
  InsertImageEx
  InsertImage
  InsertTransitionFrames
  InsertTransitionFramesEx
  MoveImage
  RemoveBlankPages
  RemoveDuplicates
  Sort


Image Access
  Bitmap
  CopyToIEBitmap
  GetBitmap
  GetTIEBitmap
  IEBitmap
  PrepareSpaceFor
  ReleaseBitmap
  SetImage
  SetImageEx
  SetImageRect
  UpdateImage


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


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


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


Thumbnail Spacing
  BottomGap
  HorizBorder
  LeftGap
  RightGap
  UpperGap
  VertBorder


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


Selections
  BeginSelectImages
  CenterSelected
  CheckThumbBoundsOnSelect
  DeleteSelectedImages
  Deselect
  EnableMultiSelect
  EndSelectImages
  IsSelected
  MoveSelectedImagesTo
  MultiSelectedImages
  MultiSelectedImagesAutoSort
  MultiSelectedImagesCount
  MultiSelectedImagesList
  MultiSelecting
  MultiSelectionOptions
  SelectAll
  SelectedFilename
  SelectedFilenames
  SelectedImage
  SelectedImageAlwaysVisible
  SelectionColor
  SelectionWidth
  SelectionWidthNoFocus
  SelectSeek
  UnselectImage
  VisibleSelection


Checkboxes
  Checkboxes
  Checked
  CheckedCount
  CheckboxPos
  SetCheckboxParams
  CheckAll
  UncheckAll


User Interaction
  Gestures
  GetImageVisibility
  ImageAtGridPos
  ImageAtPos
  InsertingPoint
  IsVisible
  KeyInteract
  MouseInteract
  MouseWheelParams (Default)
  MouseWheelParamsAlt (Ctrl Key)


ScrollBars
  CurrentScrollBars
  HScrollBarParams
  ScrollBars
  ScrollBarsAlwaysVisible
  VScrollBarParams


Single Frame View
  DisplayMode
  Playing
  PlayLoop
  TransitionDuration
  TransitionEffect
  TransitionRunning
  VisibleFrame


Other
  AddThumbButtons
  AssignLayers
  CalcGridHeight
  CalcGridWidth
  IEBeginDrag
  IEEndDrag
  IEMBitmap
  ImageEnVersion
  SetExternalMBitmap
  StoreType
  Update



Events


User Interaction Events
  OnCheckboxClick
  OnEditText
  OnImageDeselect
  OnImageSelect
  OnImageEnGesture
  OnMouseEnter
  OnMouseLeave
  OnSelectionChanging


Loading Events
  OnAllDisplayed
  OnGetLoadFilename
  OnImageIDRequestEx
  OnImageIDRequest
  OnImageLoaded
  OnIOProgress
  OnWrongImage


Paint Events
  OnAnimationText
  OnBeforeImageDrawEx
  OnBeforeImageDraw
  OnDrawProgress
  OnGetText
  OnGetTextEx
  OnImageDraw
  OnImageDraw2
  OnImageOut


Other Events
  OnAcquireBitmap
  OnAfterEvent
  OnChanged
  OnCreateImage
  OnCreateParams
  OnDestroyImage
  OnFinishWork
  OnGetHint
  OnImageAdd
  OnImageAdded
  OnImageAtPos
  OnPlayFrame
  OnPrintPage
  OnProgress
  OnShowDialog
  OnUndoRedo
  OnViewChange