ImageEn, unit iemview

TImageEnMView.GetImageToFile

TImageEnMView.GetImageToFile


Declaration

procedure GetImageToFile(idx: Integer; const FileName: WideString);


Description

Saves the image at index, idx, to file. The file format is determined by the file extension.

Parameter Description
idx The image index (0=first image)
FileName The destination path and file name


Example

// Separate the pages of a multipage TIFF
ImageEnMView1.MIO.LoadFromFile('multipage.tif');
ImageEnMView1.GetImageToFile(0, 'page1.tif');
ImageEnMView1.GetImageToFile(1, 'page2.tif');

// Save the first image to a JPEG file (at 80% quality)
ImageEnMView1.MIO.Params[0].JPEG_Quality := 80;
ImageEnMView1.GetImageToFile(0, 'D:\MyImage.jpg');

// Save all images in control to separate files
for i := 0 to ImageEnMView1.ImageCount - 1 do
  ImageEnMView1.GetImageToFile( i, 'D:\Image' + IntToStr( i ) + '.jpeg' );