ImageEn, unit iewic

TIEWICReader

TIEWICReader


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


// loads input.wdp in ImageEnView1, which is the same as ImageEnView1.IO.LoadFromFile('input.wdp')
with TIEWICReader.Create do
begin
  Open('input.wdp', ioHDP);
  GetFrame(0, ImageEnView1.IEBitmap, ImageEnView1.IO.Params);
  Free;
end;
ImageEnView1.Update;

// loads input.jpg in ImageEnView1
with TIEWICReader.Create do
begin
  Open('input.jpg', ioJPEG);
  GetFrame(0, ImageEnView1.IEBitmap, ImageEnView1.IO.Params);
  Free;
end;
ImageEnView1.Update;


// loads page 2 from input.tif to ImageEnView1
with TIEWICReader.Create do
begin
  Open('input.tif', ioTIFF);
  GetFrame(2, ImageEnView1.IEBitmap, ImageEnView1.IO.Params);
  Free;
end;
ImageEnView1.Update;


Methods and Properties


  Close
  DecoderInfo
  DPIX
  DPIY
  FrameCount
  FrameHeight
  FrameWidth
  GetFrame
  IsAvailable
  Open