THPDFJpegReducedDecoder

Decodifică direct o regiune JPEG codificată într-un bitmap BGR24 exact, de rezoluție joasă

Declarație

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

function Decode: THPDFJpegReducedDecodeStatus;

Note de utilizare

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;

Ownership and limits

API-uri asociate

THPDFJpegReducedDecodeInfo · THPDFJpegReducedDecodeStatus · Reduced-DCT JPEG Decoding