Classe THPDFJBIG2Decoder

THPDFJBIG2Decoder = class
  constructor Create;
  function LoadFromByteArray(ImageData, GlobalData: TJBIG2ByteArray): Boolean; overload;
  function LoadFromByteArray(ImageData: TJBIG2ByteArray): Boolean; overload;
  function LoadRegionFromByteArray(ImageData, GlobalData: TJBIG2ByteArray;
    RegionLeft, RegionTop, RegionWidth, RegionHeight: Integer): Boolean; overload;
  function LoadRegionFromByteArray(ImageData: TJBIG2ByteArray;
    RegionLeft, RegionTop, RegionWidth, RegionHeight: Integer): Boolean; overload;
  function GetScanline(Row: Integer; var Data: TJBIG2ByteArray): Boolean;
  property Width: Integer read FWidth;
  property Height: Integer read FHeight;
  property ScanlineByteWidth: Integer read FScanlineByteWidth;
  property LastRegionDecodeStats: TJBIG2RegionDecodeStats read FLastRegionDecodeStats;
  property UsedIncrementalRegionDecode: Boolean read FUsedIncrementalRegionDecode;
  property LastSegmentGraphValidationInfo: TJBIG2SegmentGraphValidationInfo
    read FLastSegmentGraphValidationInfo;
end;

Décode des données d'image JBIG2, éventuellement avec des données globales partagées, et expose le résultat sous forme de bitmaps pleine page ou de fenêtres de région bornées

LoadFromByteArray décode une page entière tandis que LoadRegionFromByteArray ne décode que le rectangle demandé et rend compte du chemin incrémental via UsedIncrementalRegionDecode

GetScanline renvoie les octets de scanline décodés ligne par ligne, tandis que LastRegionDecodeStats et LastSegmentGraphValidationInfo exposent les statistiques par appel et les constats sur le graphe de segments

Prise en charge de la compression JBIG2