مرجع HotPDF
يفكّ تشفير منطقة JPEG مُرمَّزة مباشرة إلى bitmap دقيق بدقة منخفضة من نوع 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 الذي تعرضه
Bitmap - يبقى الـbitmap المُرجَع صالحًا حتى يُعاد تحميل فكّاك الشفرة أو تدميره
- تحدّ
MaxOutputBytesbitmap الهدف، ويعطّل الصفر ذلك الحد الصريح - يُستدعى
OnCancellationCheckمن حلقة scanline - يعرض
Infoالأبعاد المُحجَّمة التي يُبلغ بها فكّاك الشفرة وتقديرات ذاكرة العمل
الاستخدام
THPDFJpegReducedDecodeInfo · THPDFJpegReducedDecodeStatus · فك تشفير JPEG بـReduced-DCT