JPEG2000 Image Format Support

ภาพรวม

ตอนนี้ HotPDF รองรับ JPEG2000 image formats อย่างครบถ้วน รวมถึง JP2, J2K และ JPT files JPEG2000 เป็น wavelet-based image compression standard ที่ให้ compression efficiency และ quality สูงกว่า JPEG format แบบเดิม

formats ที่รองรับ

  • JP2: JPEG2000 Part 1 format with complete file structure
  • J2K: JPEG2000 codestream format (raw compressed data)
  • JPT: JPEG2000 Part 9 JPIP (JPEG2000 Interactive Protocol) format

Key Features

  • Automatic format detection and appropriate processing
  • Support for both lossless and lossy compression
  • Multi-component image support (RGB, RGBA, Grayscale)
  • Advanced bit-depth support (8, 12, 16 bits per component)
  • Progressive decoding capabilities
  • Memory-efficient processing for large images

Usage Example


// Delphi example - Adding JPEG2000 image to PDF
procedure AddJPEG2000Image;
var
  PDF: THotPDF;
begin
  PDF := THotPDF.Create(nil);
  try
    PDF.FileName := 'output.pdf';
    PDF.BeginDoc;
    PDF.AddPage;

    // Add JPEG2000 image - format is automatically detected
    PDF.AddImage('sample.jp2', 100, 100, 200, 150);

    // J2K codestream format is also supported
    PDF.AddImage('sample.j2k', 100, 300, 200, 150);

    PDF.EndDoc;
  finally
    PDF.Free;
  end;
end;
        

Technical Implementation

JPEG2000 support ถูก implement ผ่าน unit HPDFJpeg2000.pas ซึ่งมี:

  • THPDFJpeg2000Decoder: Main decoder class for processing JPEG2000 images
  • Format Detection: Automatic identification of JP2, J2K, and JPT formats
  • Stream Processing: Support for both file and stream-based image loading
  • OpenJPEG Integration: Framework for advanced processing using OpenJPEG library

Performance Benefits

  • Better compression ratios than traditional JPEG
  • No blocking artifacts at high compression rates
  • Progressive transmission and viewing
  • Region of interest (ROI) encoding support
  • Lossless compression option

Compatibility

JPEG2000 support มีทั้งใน HotPDF รุ่น 32-bit และ 64-bit และเข้ากันได้กับ Delphi และ C++Builder versions ที่รองรับทั้งหมด

See Also