ImageEn, unit iewic

TIEWICReader


Declaration

TIEWICReader = class;


Description

TIEWICReader class encapsulates some Microsoft Windows Imaging Component (WIC) interfaces and allows you to load Microsoft HD Photo, JPEG XR, DirectDraw Surface and other WIC installed file formats.
WIC preinstalled decoders are TIFF, PNG, GIF, ICO, BMP, JPEG, HDP (See: WIC_LOAD_FILETYPES).
Other formats are available on the Microsoft Store.

Note: Requires Windows XP (SP2) with .Net 3.0, Windows Vista or newer.


Examples

// Load input.wdp in ImageEnView1
// This is the same as calling ImageEnView1.IO.LoadFromFile('input.wdp')
with TIEWICReader.Create do
begin
  Open( 'C:\input.wdp' );
  GetFrame(0, ImageEnView1.IEBitmap, ImageEnView1.IO.Params);
  Free;
end;
ImageEnView1.Update;

// Load page 2 of input.tif to ImageEnView1
// This is the same as setting ImageEnView1.IO.Params.ImageIndex := 2; Then calling ImageEnView1.IO.LoadFromFile('input.tiff')
with TIEWICReader.Create do
begin
  Open( 'C:\input.tiff' );
  GetFrame(2, ImageEnView1.IEBitmap, ImageEnView1.IO.Params);
  Free;
end;
ImageEnView1.Update;


Methods and Properties

Public Method  Close
Public Method  DecoderInfo
Public Property  DpiX
Public Property  DpiY
Public Property  FrameCount
Public Method  FrameHeight
Public Method  FrameWidth
Public Method  GetFrame
Public Method  IsAvailable
Public Method  Open