ImageEn, unit ieMIO

TImageEnMIO.LoadFromFileZIP

TImageEnMIO.LoadFromFileZIP

Declaration

function LoadFromFileZIP(const FileName: string; const Password: string = ''): Boolean;

Description

Loads the content of an archive file into the attached TImageEnMView or TIEMultiBitmap using a plug-in.
The following archive formats are supported: Zip, ZipX, EPub, 7z, BZip2, Cab, Rar, Tar, ISO, CHM and LZH.
If the file is encrypted you can specify the password (otherwise a password prompt can be displayed if you enable AutoPromptForPassword. You can also use the OnPassword event).
Result will be False if the file is not a supported format or the 7z plug-in plug-in is not available (Aborting will be True). Loading errors due to a file not being available will raise an exception.

LoadFromFileZIP loads the entire content of the zip immediately which can be slow if you are loading full size images (StoreType=ietNormal). For more control you are generally better to use FillFromZip which provides many options, including support for folders, dynamic loading and filtering.


The following properties will also be read from the zip file:
◼ImageCreateDate
◼ImageEditDate
◼ImageFileSize
◼ImageTag (File index)

Note:
◼Archive extraction requires the 7z plug-in
◼The archive file must have a supported extension: *.zip, *.zipx, *.epub, *.7z, *.bzip2, *.bz2, *.gzip, *.cab, *.rar, *.tar, *.iso, *.chm, *.lzh
◼Existing content is not cleared from the control. Call Clear to remove existing content before loading
◼To abort while loading set Aborting to True
◼Read more about ImageEn ZIP Support

Example

// Show all files within a zip file
ImageEnMView1.Clear();
ImageEnMView1.MIO.LoadFromFileZIP('C:\Test.zip');