ImageEn, unit imageenio

TImageEnIO


Declaration

TImageEnIO = class(TComponent);


Description

TImageEnIO provides input/output support to ImageEn:
- Loading and saving images
- Access to image properties and meta-data
- Acquisition of images from cameras and scanners
- Printing
- DirectShow functions for multimedia support

See also: TImageEnMIO, which is made to work with images containing multiple frames (e.g. animated GIFs)




Generally you will not add a TImageEnIO component directly to your project. It is accessed via the following methods:

1. Using the IO property of a TImageEnView

ImageEnView1.IO.LoadFromFile('C:\MyImage.jpeg');
ImageEnView1.IO.DoPrintPreviewDialog();


2. Attached to a TBitmap or TIEBitmap in code

bmp := TBitmap.create;
io := TImageEnIO.CreateFromBitmap(bmp);
io.LoadFromFile('C:\input.jpg');
...
io.Free;
bmp.Free;


3. Attached to a TImage

Note: In this case a TImageEnIO would be added to the form and the AttachedTImage set appropriately.


Notes

- Ensure you do not call any TImageEnIO methods before it is actually attached to an image container (TImageEnView, TIEBitmap, etc)
- Do not attach TImageEnIO to a TImageEnMView component. Only a TImageEnMIO can be attached to a TImageEnMView component.



Demos

Demo Description Demo Project Folder Compiled Demo
Annotations in Meta-Data Add text, lines and highlighting to an image and store them in meta-data \Demos\InputOutput\Annotations\Annotations.dpr   
Camera Raw Files Loading digital camera raw files using the ielib.dll plug-in \Demos\InputOutput\CameraRaw\CameraRaw.dpr   
Dicom Viewer Read and animate images of a Dicom file \Demos\InputOutput\Dicom\Dicom.dpr   
EXIF Editor View and edit EXIF fields from a digital camera files (JPEG, RAW, etc) \Demos\InputOutput\EXIF\EXIF.dpr   
Image Loading Performance Options to improve loading performance with TImageEnView \Demos\InputOutput\IEViewPerformance\Performance.dpr   
IPTC Editor View and edit IPTC fields from a JPEG or TIFF image \Demos\InputOutput\IPTC\IPTC.dpr   
Geo Maps Use the GPS data in photos to show their location on a map \Demos\InputOutput\GeoMaps\GeoMaps.dpr   
Multi-Page Image Loading Using ImageEnView buttons to navigate the images stored in a multiple-frame file, such as TIFF, GIF, MPEG, PDF, etc. \Demos\InputOutput\IEViewMulti\IEViewMulti.dpr   
PDF Builder Create PDF and PS files from a selection of images \Demos\InputOutput\PDFBuilder\PDFBuilder.dpr   
Preload Images Loading images in the background and displaying as required \Demos\InputOutput\Preload\Preload.dpr   
Print Selection Print only the selected area of an image \Demos\InputOutput\PrintSelected\PrintSelected.dpr   
Printing Demo Printing and print preview demo \Demos\InputOutput\PrintProjects\PrintProjects.dpr   
True Raw Bitmap Format Loading and saving images in a true "Raw" format (Note: this is not the same as camera raw format) \Demos\InputOutput\RealRAW\RealRAW.dpr   
XMP Meta Data Display common XMP fields from JPEG, TIFF and PSD files \Demos\InputOutput\XMP\XMP.dpr   
Acquire from Any Source Acquisition from any source: Twain, WIA and connected cameras and cards \Demos\ImageAcquisition\AllAcquire\AllAcquire.dpr   
All Actions Demo showing all ImageEn actions (400+) available to rapidly build applications \Demos\Actions\AllActions\AllActions.dpr   


General Methods and Properties

Connected Component
Public Property  AttachedBitmap
Public Property  AttachedIEBitmap
Published Property  AttachedImageEn
Published Property  AttachedTImage
Public Method  Update

Generic Input/Output
Public Property  Aborting
Public Method  AssignParams
Published Property  AutoAdjustDPI
Published Property  Background
Public Property  Bitmap
Public Method  CaptureFromScreen
Public Property  ChangeBackground
Public Method  Create
Public Method  CreateFromBitmap
Public Property  DefaultDitherMethod
Published Property  FilteredAdjustDPI
Public Property  IEBitmap
Public Method  LoadFromBuffer
Public Method  LoadFromFileAuto
Public Method  LoadFromFile
Public Method  LoadFromResource
Public Method  LoadFromStream
Public Method  LoadFromText
Public Method  LoadFromURL
Published Property  NativePixelFormat
Public Property  Params
Public Method  ParamsFromBuffer
Public Method  ParamsFromFile
Public Method  ParamsFromStream
Public Method  SaveToFile
Public Method  SaveToStream
Public Method  SaveToText
Public Method  Seek
Published Property  StreamHeaders
Public Property  WicFastLoading

Image Acquisition (Twain/WIA)
Public Method  Acquire
Public Method  SelectAcquireSource
Public Property  SelectedAcquireSource
Public Method  SetAcquireSource
Public Property  AcquireParams
Public Property  DCIMParams
Public Property  TwainParams
Public Method  TwainAcquireOpen
Public Method  TwainAcquireClose
Public Property  WIAParams

Aynchronous Input/Output
Public Property  AsyncMode
Public Property  AsyncRunning
Public Property  ThreadsCount
Public Method  WaitThreads

Video Capture
Public Property  DShowParams
Public Property  MediaFoundationSourceReader

Dialogs
Published Property  DialogsMeasureUnit
Public Method  DoPreviews
Public Method  ExecuteOpenDialog
Public Method  ExecuteSaveDialog
Published Property  PreviewFont
Published Property  PreviewFontEnabled
Published Property  PreviewsParams
Published Property  SimplifiedParamsDialogs

Printing
Public Method  DoPrintPreviewDialog
Public Method  PreviewPrintImage
Public Method  PrintImagePos
Public Method  PrintImage
Public Property  PrintingFilterOnSubsampling
Public Property  PrintingMaintainAR
Public Property  PrintPreviewParams


Format-Specific Methods

Adobe PDF
Public Method  ClosePDFFile
Public Method  CreatePDFFile
Public Method  LoadFromFilePDF
Public Method  LoadFromStreamPDF
Public Method  SaveToFilePDF
Public Method  SaveToPDF
Public Method  SaveToStreamPDF

Adobe PSD
Public Method  LoadFromFilePSD
Public Method  LoadFromStreamPSD
Public Method  SaveToFilePSD
Public Method  SaveToStreamPSD

AVI Videos
Public Method  CloseAVIFile
Public Method  CreateAVIFile
Public Method  IsOpenAVI
Public Method  LoadFromAVI
Public Method  OpenAVIFile
Public Method  SaveToAVI

BMP
Public Method  LoadFromFileBMP
Public Method  LoadFromStreamBMP
Public Method  SaveToFileBMP
Public Method  SaveToStreamBMP

BmpRaw (a true "raw" bitmap format, not a camera Raw file)
Public Method  LoadFromFileBMPRAW
Public Method  LoadFromStreamBMPRAW
Public Method  SaveToFileBMPRAW
Public Method  SaveToStreamBMPRAW

Camera Raw Files
Public Method  LoadFromFileRAW
Public Method  LoadFromStreamRAW
Public Method  LoadJpegFromFileCRW

Cursors (CUR)
Public Method  LoadFromFileCUR
Public Method  LoadFromStreamCUR

DICOM Medical Imaging Format
Public Method  InjectDICOMTags
Public Method  LoadFromFileDICOM
Public Method  LoadFromStreamDICOM
Public Method  SaveToFileDICOM
Public Method  SaveToStreamDICOM

GIF
Public Method  InsertToFileGIF
Public Method  LoadFromFileGIF
Public Method  LoadFromStreamGIF
Public Method  SaveToFileGIF
Public Method  SaveToStreamGIF
Public Method  ReplaceFileGIF

Icons (ICO)
Public Method  LoadFromFileICO
Public Method  LoadFromStreamICO
Public Method  SaveToFileICO
Public Method  SaveToStreamICO

IEN (ImageEn native image format with layers)
Public Method  LoadFromFileIEN
Public Method  LoadFromStreamIEN
Public Method  SaveToFileIEN
Public Method  SaveToStreamIEN

JPEG
Public Method  InjectJpegEXIFStream
Public Method  InjectJpegEXIF
Public Method  InjectJpegIPTCStream
Public Method  InjectJpegIPTC
Public Method  LoadFromFileJpeg
Public Method  LoadFromStreamJpeg
Public Method  SaveToFileJpeg
Public Method  SaveToStreamJpeg

JPEG 2000
Public Method  LoadFromFileJ2K
Public Method  LoadFromFileJP2
Public Method  LoadFromStreamJ2K
Public Method  LoadFromStreamJP2
Public Method  SaveToFileJ2K
Public Method  SaveToFileJP2
Public Method  SaveToStreamJ2K
Public Method  SaveToStreamJP2

Media Files (AVI, MPEG, WMV..)
Public Method  CloseMediaFile
Public Method  IsOpenMediaFile
Public Method  LoadFromMediaFile
Public Method  OpenMediaFile

Meta Files (WMF, EMF)
Public Method  ImportMetafile
Public Method  MergeMetaFile

Microsoft HD Photos/JPEG XR (WDP/JXR/HDP)
Public Method  LoadFromFileHDP
Public Method  LoadFromStreamHDP
Public Method  SaveToFileHDP
Public Method  SaveToStreamHDP

PCX and DCX (Multipage PCX)
Public Method  LoadFromFileDCX
Public Method  LoadFromStreamDCX
Public Method  LoadFromFilePCX
Public Method  LoadFromStreamPCX
Public Method  SaveToStreamDCX
Public Method  SaveToFileDCX
Public Method  InsertToFileDCX
Public Method  SaveToFilePCX
Public Method  SaveToStreamPCX

PNG
Public Method  LoadFromFilePNG
Public Method  LoadFromStreamPNG
Public Method  SaveToFilePNG
Public Method  SaveToStreamPNG

PostScript (PS)
Public Method  ClosePSFile
Public Method  CreatePSFile
Public Method  SaveToFilePS
Public Method  SaveToPS
Public Method  SaveToStreamPS

PXM (PPM, PBM, PGM)
Public Method  LoadFromFilePXM
Public Method  LoadFromStreamPXM
Public Method  SaveToFilePXM
Public Method  SaveToStreamPXM

SVG (Scalable Vector Graphics)
Public Method  SaveToFileSVG
Public Method  SaveToStreamSVG

Targa (TGA)
Public Method  LoadFromFileTGA
Public Method  LoadFromStreamTGA
Public Method  SaveToFileTGA
Public Method  SaveToStreamTGA

TIFF
Public Method  InjectTIFFEXIF
Public Method  InsertToFileTIFF
Public Method  InsertToStreamTIFF
Public Method  LoadFromFileTIFF
Public Method  LoadFromStreamTIFF
Public Method  ReplaceFileTIFF
Public Method  ReplaceStreamTIFF
Public Method  SaveToFileTIFF
Public Method  SaveToStreamTIFF

WBMP
Public Method  LoadFromFileWBMP
Public Method  LoadFromStreamWBMP
Public Method  SaveToFileWBMP
Public Method  SaveToStreamWBMP

Windows Images (such as HEIF/HEIC, DirectDraw Surface, etc)
Public Method  LoadFromFileWIC
Public Method  LoadFromStreamWIC
Public Method  SaveToFileWIC
Public Method  SaveToStreamWIC


Events

Event  OnAcquireBitmap
Event  OnAcquireClose
Event  OnDoPreviews
Event  OnFinishWork
Event  OnIOPreview
Event  OnPrintPage
Event  OnProgress