THPDFJpegReducedDecoder
Dekodira kodirano JPEG područje izravno u točnu niskorezolucijsku BGR24 bitmapu
Deklaracija
function LoadFromBytes(const Data: THPDFJpegByteArray;
const Region: TRect; TargetWidth, TargetHeight: Integer;
MaxOutputBytes: Int64 = 268435456): Boolean;
function Decode: THPDFJpegReducedDecodeStatus;
Korištenje
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;
Vlasništvo i ograničenja
- Dekoder kopira kodirani unos i posjeduje bitmapu koju izlaže
Bitmap - Vraćena bitmapa ostaje važeća dok se dekoder ponovno ne učita ili ne uništi
MaxOutputBytesograničava ciljnu bitmapu, a nula onemogućuje to izričito ograničenjeOnCancellationCheckpoziva se iz petlje scanline-aInfoizlaže skaliranu geometriju koju prijavljuje dekoder i procjene radne memorije
Povezani API-ji
THPDFJpegReducedDecodeInfo · THPDFJpegReducedDecodeStatus · Smanjeno-DCT JPEG dekodiranje