THPDFJpegReducedDecoder

Decodifica una región JPEG codificada directamente en un bitmap BGR24 de baja resolución exacto

Declaración

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

function Decode: THPDFJpegReducedDecodeStatus;

Uso

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;

Propiedad y límites

APIs relacionadas

THPDFJpegReducedDecodeInfo · THPDFJpegReducedDecodeStatus · Decodificación JPEG con DCT reducido