|
JBIG2 Compression Support
Pregled
HotPDF sada uključuje sveobuhvatnu JBIG2 (Joint Bi-level Image Experts Group 2) podršku za kompresiju. JBIG2 je standard kompresije sa gubitkom ili bez gubitka posebno namenjen bi-level (monohromatskim) slikama, koje se često koriste u PDF dokumentima za skenirane tekstualne strane i line art
Key Features
- High-efficiency compression for bilevel images
- Podrška i za kompresiju sa gubitkom i bez gubitka
- Optimized for text and line art compression
- Significant file size reduction compared to traditional compression methods
- Full PDF/A compliance support
- Podrška za višestrani dokument sa deljenim rečnicima
Compression Benefits
- Superior Compression Ratios: Up to 3-5x better compression than Group 4 CCITT
- Pattern Recognition: Intelligent recognition of repeated patterns and symbols
- Adaptive Compression: Automatically adjusts compression strategy based on content type
- Memory Efficient: Optimized for processing large scanned documents
Typical Use Cases
- Scanned text documents
- Technical drawings and blueprints
- Forms and invoices
- Maps and diagrams
- Mixed content documents with text and graphics
Tehnička implementacija
JBIG2 podrška je implementirana kroz jedinicu HPDFJBIG2.pas, koja obezbeđuje:
- THPDFJBIG2Decoder: Osnovna klasa dekodera za JBIG2 komprimovane podatke
- Stream Processing: Efikasno rukovanje JBIG2 tokovima podataka
- Global Dictionary Support: Deljeni rečnici simbola za dokumente sa više stranica
- Scanline Access: Pristup podacima red po red za obradu sa efikasnim korišćenjem memorije
Primer upotrebe
// Delphi example - Processing JBIG2 compressed data
procedure ProcessJBIG2Data;
var
PDF: THotPDF;
Decoder: THPDFJBIG2Decoder;
ImageData: TBytesArray;
ScanlineData: TBytesArray;
Row: Integer;
begin
PDF := THotPDF.Create(nil);
Decoder := THPDFJBIG2Decoder.Create;
try
PDF.BeginDoc;
PDF.AddPage;
// Load JBIG2 compressed image data
if Decoder.LoadFromByteArray(ImageData) then
begin
// Process scanline by scanline for memory efficiency
for Row := 0 to Decoder.Height - 1 do
begin
if Decoder.GetScanline(Row, ScanlineData) then
begin
// Process scanline data as needed
// Add to PDF page
end;
end;
end;
PDF.EndDoc;
finally
Decoder.Free;
PDF.Free;
end;
end;
Class Reference
THPDFJBIG2Decoder
- LoadFromByteArray: Load JBIG2 data from byte array
- GetScanline: Retrieve specific scanline data
- Width/Height: Image dimensions properties
Performance Optimization
- Memory-efficient scanline processing
- Optimized for large document handling
- Minimal memory footprint during decompression
- Fast pattern recognition algorithms
Standards Compliance
- ITU-T T.88 standard compliance
- ISO/IEC 14492 standard support
- PDF/A archival format compatibility
- Cross-platform consistency
Vidi i
|