ImageEn, unit iexSevenZip |
|
SevenZip PlugIn
SevenZip is an open source library that ImageEn uses to provide zip support.
When the SevenZip plug-in is installed:
- TImageEnView can load images from zip files and navigate the content of zip files (e.g. using onscreen Buttons)
- TImageEnMView can load and display the content of zip files
- TImageEnFolderMView can browse the content of zip files
- TIEFolderTree can display the folder tree within a zip file
The following features are supported:
- 256bit AES and other encrypted zip files (with automatic password prompt)
- Zip folders (or optional flat file display)
- Extraction of all or individual zip files
- Dynamic loading of thumbnails

Notes
- Download the SevenZip plug-in from: www.imageen.com/download/
- The plug-in must be registered once by your application
- Distributions must include the copyright notices that are included with the ImageEn SevenZip installation
Demos
| Demos\Other\ZipBrowser\ZipBrowser.dpr |
| Demos\Multi\FolderMView\FolderMView.dpr |
Examples
// Register the SevenZip Plug-In
IEGlobalSettings().RegisterPlugIns([ iepiSevenZip ]);
// Load the first file in a zip and show buttons to allow navigation
ImageEnView1.ShowButtons := [ iebtPrevious, iebtNext ];
ImageEnView1.IO.LoadFromFileZIP( 'C:\Test.zip', 0 );
// Extract all files from a zip file to D:\Out\ (Recreating the internal zip folder structure)
ImageEnView1.IO.ExtractFromFileZIP( 'C:\test.zip', -1, 'D:\Out\', True );
// 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\' );
// Output all images in a ZIP file to PNG
filename := 'C:\doc.ZIP';
outputFolder := 'D:\';
bmp := TIEBitmap.Create;
bmp.ParamsEnabled := True;
idx := 0;
Repeat
bmp.Params.ImageIndex := idx;
if bmp.Read( filename ) then
bmp.Write( IncludeTrailingBackSlash( outputFolder ) + format( '%s_%d.png', [ ExtractFilename( filename ), idx+1 ] ));
inc( idx );
Until idx > bmp.Params.ImageCount - 1;
bmp.Free;
See Also
-
LoadFromFileZIP-
ExtractFromFileZIP-
LoadFromFileZIP-
ExtractFromFileZIP