THPDFJpegReducedDecoder

Dekoduje zakodowany region JPEG bezpośrednio do dokładnej bitmapy BGR24 o niskiej rozdzielczości

Deklaracja

function LoadFromBytes(const Data: THPDFJpegByteArray;
  const Region: TRect; TargetWidth, TargetHeight: Integer;
  MaxOutputBytes: Int64 = 268435456): Boolean;

function Decode: THPDFJpegReducedDecodeStatus;

Użycie

Decoder := THPDFJpegReducedDecoder.Create;
try
  if Decoder.LoadFromBytes(Data, Rect(0, 0, 12000, 12000), 300, 300) and
    (Decoder.Decode = jrdsCompleted) then
  begin
    Bitmap.Assign(Decoder.Bitmap);
    Info := Decoder.Info;
  end;
finally
  Decoder.Free;
end;

Własność i limity

Powiązane API

THPDFJpegReducedDecodeInfo · THPDFJpegReducedDecodeStatus · Dekodowanie JPEG ze zredukowanym DCT