THPDFJpegReducedDecoder
인코딩된 JPEG 영역을 정확한 저해상도 BGR24 비트맵으로 곧장 디코드합니다
선언
function LoadFromBytes(const Data: THPDFJpegByteArray;
const Region: TRect; TargetWidth, TargetHeight: Integer;
MaxOutputBytes: Int64 = 268435456): Boolean;
function Decode: THPDFJpegReducedDecodeStatus;
사용 예
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;
소유권과 제한
- 디코더는 인코딩된 입력을 복사하며
Bitmap으로 노출되는 비트맵을 소유합니다 - 반환된 비트맵은 디코더를 다시 로드하거나 파괴할 때까지 유효합니다
MaxOutputBytes는 대상 비트맵에 상한을 두고, 0이면 이 명시적 한도가 꺼집니다OnCancellationCheck는 스캔라인 루프에서 호출됩니다Info는 디코더가 보고한 스케일된 지오메트리와 작업 메모리 추정치를 노출합니다
관련 API
THPDFJpegReducedDecodeInfo · THPDFJpegReducedDecodeStatus · 축소 DCT JPEG 디코딩