Class GenericRefinementRegion

java.lang.Object
org.apache.pdfbox.jbig2.segments.GenericRefinementRegion
All Implemented Interfaces:
Region, SegmentData

public class GenericRefinementRegion extends Object implements Region
Handles a JBIG2 Generic Refinement Region segment (§7.4.7).

This class is responsible for segment-level concerns only: parsing the region segment information and flags from the bitstream, resolving the reference bitmap, and delegating pixel decoding to GenericRefinementRegionDecodingProcedure, which implements the pure algorithm defined in §6.3.5.6.

Segment types (§7.4.7)

The three generic refinement region segment types — intermediate, immediate, and immediate lossless — share an identical data encoding. They differ only in how the decoded bitmap is acted upon during page image composition (§8.2):

  • Intermediate generic refinement region — the decoded bitmap is stored but not yet composited onto the page buffer.
  • Immediate generic refinement region — the decoded bitmap is composited onto the page buffer immediately using lossy encoding.
  • Immediate lossless generic refinement region — as above but using lossless encoding.

Usage modes