|
JPEG2000 Image Format Support
Overview
HotPDF는 JP2와 J2K 파일을 포함한 JPEG2000 이미지 형식을 포괄적으로 지원합니다. JPEG2000은 웨이블릿 기반 이미지 압축 표준으로, 기존 JPEG 형식보다 뛰어난 압축 효율과 화질을 제공합니다
Supported Formats
- JP2: JPEG2000 Part 1 format with complete file structure
- J2K: JPEG2000 codestream format (raw compressed data)
Key Features
- Automatic format detection and appropriate processing
- 무손실 및 손실 압축 지원
- Multi-component image support (RGB, RGBA, Grayscale)
- Advanced bit-depth support (8, 12, 16 bits per component)
- Direct validated codestream-tile decoding with tile-grid metadata
- 원본 영역과 2의 거듭제곱 해상도 관심 영역을 결합한 디코딩
- 악의적이거나 예상보다 큰 코드스트림에 대비한 디코딩 출력 예산
- Automatic renderer resolution selection from visible target pixels
- Bounded parallel reconstruction of independent intersecting tiles
- Deterministic composition, cancellation, worker-limit, and peak-memory telemetry
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 지원은 HPDFJpeg2000.pas 유닛으로 구현되며, 다음을 제공합니다
- THPDFJpeg2000Decoder: Main decoder class for processing JPEG2000 images
- 형식 감지: JP2, J2K, JPT 형식을 자동으로 식별합니다
- Header Inspection:
InspectHeaderFromByteArray reads dimensions, components and SourceColorSpace without decoding pixel samples
- 스트림 처리: 파일 기반과 스트림 기반 이미지 로딩을 모두 지원합니다
- 타일 접근:
LoadTileFromByteArray는 검증된 타일 하나를 디코딩하고 그 원본 오프셋과 그리드를 보고합니다
- 해상도 선택:
LoadRegionFromByteArray는 원본 사각형과 웨이블릿 축소 계수를 결합합니다
- Parallel Tile Decode:
LoadRegionFromByteArrayParallel uses independent decoder instances and deterministic row-major composition
- 로드된 PDF:
DecodeLoadedImageRegionAtResolution은 어느 대상 치수도 해상도가 부족해지지 않는 레벨을 선택합니다
- Operation Controls:
JPEG2000ParallelTileDecoding and JPEG2000TileWorkerLimit control renderer integration, while GetLastJPEG2000ParallelDecodeStats reports scheduling and budget estimates
- OpenJPEG 연동: Win32와 Win64에서 네이티브 링크 디코딩
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 지원은 HotPDF의 32비트와 64비트 버전 모두에서 사용할 수 있으며, 지원되는 모든 Delphi 및 C++ Builder 버전과 호환됩니다
See Also
|