ImageEn, unit iexHelperFunctions

TBitmapHelper.IO

TBitmapHelper.IO


Declaration

property IO: TImageEnIO;


Description

Returns a TImageEnIO component, which provides all functionality for loading and saving images, and other I/O functions, such as printing and scanning.

Note:
 You must add the iexHelperFunctions unit to your uses clause
 To assign between TBitmap and TIEBitmap, you can use TIEBitmap.Assign and TIEBitmap.AssignTo


Examples

// Load an image, quality scale it by 50%, and save
bmp := TBitmap.Create();
try
  bmp.IO.LoadFromFile( 'D:\im2.jpg' );
  bmp.Proc.Resample( 0.5, rfLanczos3 );
  bmp.IO.Params.JPEG_Quality := 90;
  bmp.IO.SaveToFile( 'D:\out.jpg' );
finally
  bmp.FreeImageEnObjects();  // Not required but improves memory handling
  bmp.Free();
end;

// Retrieve an image from a Twain scanner
myBMP.IO.AcquireParams.YResolution := 300;
myBMP.IO.AcquireParams.XResolution := 300;
myBMP.IO.Acquire();

// Prompt to print the current image
myBMP.IO.DoPrintPreviewDialog( iedtDialog );



See Also

 Proc
 FreeImageEnObjects