THPDFJpegReducedDecoder

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

Declaration

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 · Descodificación JPEG DCT reducida