TImageEnMView.FillFromZIP
Declaration
procedure FillFromZip(const ZipFilename, ZipPath: String;
FileTypes : TIEFolderFileTypes;
const FilterMask : WideString = '';
LoadOnDemand : boolean = true;
DefaultTopText : TIEImageEnMViewDefaultText = iedtNone;
DefaultInfoText : TIEImageEnMViewDefaultText = iedtNone;
DefaultBottomText : TIEImageEnMViewDefaultText = iedtFilename;
bShowFolders : Boolean = True); overload;
procedure FillFromZip(ZipFilename, ZipPath: String; Limit : integer = -1;
AllowUnknownFormats : boolean = false; const ExcludeExtensions : WideString = '';
const FilterMask : WideString = ''; IncludeVideoFiles : Boolean = False;
LoadOnDemand : boolean = true;
DefaultTopText : TIEImageEnMViewDefaultText = iedtNone;
DefaultInfoText : TIEImageEnMViewDefaultText = iedtNone;
DefaultBottomText : TIEImageEnMViewDefaultText = iedtFilename;
bShowFolders : Boolean = True;
const FilenameFilter: string = ''); overload;
Description
Fills the ImageEnMView with files from the specified
ZIP archive.
You can cancel the insertion of files by setting MIO.Aborting := True;
Parameter | Description | Default |
ZipFilename | The zip file to load content from | Required |
ZipPath | The zip file to load content from. If '' the entire zip will be loaded (flat display), otherwise specify a path, such as '\' for root, or '\Path\Path2\ | Required |
FileTypes | Specify the types of files to include | |
Limit | The maximum number of images to load. Use -1 to retrieve all files | -1 |
AllowUnknownFormats | If false (default) only known and supported file formats are loaded. Otherwise all files are loaded | False |
ExcludeExtensions | A comma separated list of file extensions to skip (e.g. 'lyr,all,iev') | '' |
FilterMask | Limits the fill to file extensions found in a comma separated list (e.g. 'jpg,jpeg,jpe'). Specify an empty string to return all supported extensions | '' |
bIncludeVideoFiles | If AllowUnknownFormats is false then video files are excluded by default. Set to true to include supported video file types such as AVI and MPEG. Thumbnails for video files will be retrieved from Windows Explorer if the format is specified in MViewExplorerThumbnailExts | False |
LoadOnDemand | If True (Default), images are only loaded as they are displayed (i.e. not until they are scrolled into view). Set to false to load all images immediately | True |
DefaultTopText | Specify the text that is applied to ImageTopText | iedtNone |
DefaultInfoText | Specify the text that is applied to ImageInfoText | iedtNone |
DefaultBottomText | Specify the text that is applied to ImageBottomText | iedtFilename |
bShowFolders | Enable to include folders | False |
FilenameFilter | Limits the file to filenames that contain text specified by FilenameFilter (see Filter for more detail) | '' |
The following properties will also be read from the zip file:
◼ImageCreateDate◼ImageEditDate◼ImageFileSize◼ImageTag (File index)
Note:
◼ZIP extraction requires the
7z plug-in from:
www.imageen.com/download/◼Does NOT clear existing content. Use
Clear first to replace existing content
◼If an invalid zip filename is specified an exception is raised
◼If you want to change text values after filling (e.g. with
DefaultBottomText), you should specify iedtNone for the Default*Text parameters
◼Alternatively, ZipFilename can include its own path (instead of setting ZipPath), e.g. C:\Folder\MyZip.zip\Path\
| Demos\Other\ZipBrowser\ZipBrowser.dpr |
ImageEnMView1.Clear();
// Display all files within a zip (ignoring the internal folder structure)
ImageEnMView1.FillFromZIP( 'C:\Files\Images.zip' );
// Display files within the root folder of the zip
ImageEnMView1.FillFromZIP( 'C:\Files\Images.zip', '\' );
// Display files within the zip folder \Holidays\Italy\
ImageEnMView1.FillFromZIP( 'C:\Files\Images.zip', '\Holidays\Italy\' );
// Get images and videos
ImageEnMView1.FillFromZIP( 'C:\Files\Images.zip', '', iefAllImagesAndVideos );
// Get only JPEG images
ImageEnMView1.FillFromZIP( 'C:\Files\Images.zip, '', iefCustom, '*.jpg;*.jpeg;' );
// To make it easier to change the text values, specify iedtNone at the time of filling
ImageEnMView1.FillFromZIP( 'C:\Files\Images.zip, '', iefAllImages, '', True, iedtNone, iedtNone, iedtNone );
ImageEnMView1.DefaultTopText := iedtFilename;
ImageEnMView1.DefaultInfoText := iedtFileCreateDate;
ImageEnMView1.DefaultBottomText := iedtFileSize;
See Also
◼FillFromDirectory◼LoadFromFileZip