segments

package
v3.0.0-...-55e877b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2023 License: GPL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Documenter

type Documenter interface {
	GetPage(int) (Pager, error)
	GetGlobalSegment(int) (*Header, error)
}

type EncodeInitializer

type EncodeInitializer interface{ InitEncode() }

type EndOfStripe

type EndOfStripe struct {
	// contains filtered or unexported fields
}

func (*EndOfStripe) Init

func (_ea *EndOfStripe) Init(h *Header, r *_bc.Reader) error

func (*EndOfStripe) LineNumber

func (_ag *EndOfStripe) LineNumber() int

type GenericRefinementRegion

type GenericRefinementRegion struct {
	RegionInfo      *RegionSegment
	IsTPGROn        bool
	TemplateID      int8
	Template        templater
	GrAtX           []int8
	GrAtY           []int8
	RegionBitmap    *_fd.Bitmap
	ReferenceBitmap *_fd.Bitmap
	ReferenceDX     int32
	ReferenceDY     int32
	// contains filtered or unexported fields
}

func (*GenericRefinementRegion) GetRegionBitmap

func (_fcc *GenericRefinementRegion) GetRegionBitmap() (*_fd.Bitmap, error)

func (*GenericRefinementRegion) GetRegionInfo

func (_eeg *GenericRefinementRegion) GetRegionInfo() *RegionSegment

func (*GenericRefinementRegion) Init

func (_fgc *GenericRefinementRegion) Init(header *Header, r *_bc.Reader) error

func (*GenericRefinementRegion) String

func (_dcgaf *GenericRefinementRegion) String() string

type GenericRegion

type GenericRegion struct {
	DataHeaderOffset int64
	DataHeaderLength int64
	DataOffset       int64
	DataLength       int64
	RegionSegment    *RegionSegment
	UseExtTemplates  bool
	IsTPGDon         bool
	GBTemplate       byte
	IsMMREncoded     bool
	UseMMR           bool
	GBAtX            []int8
	GBAtY            []int8
	GBAtOverride     []bool

	Bitmap *_fd.Bitmap
	// contains filtered or unexported fields
}

func NewGenericRegion

func NewGenericRegion(r *_bc.Reader) *GenericRegion

func (*GenericRegion) Encode

func (_eaa *GenericRegion) Encode(w _bc.BinaryWriter) (_fdee int, _bda error)

func (*GenericRegion) GetRegionBitmap

func (_bfg *GenericRegion) GetRegionBitmap() (_cecb *_fd.Bitmap, _begg error)

func (*GenericRegion) GetRegionInfo

func (_fdag *GenericRegion) GetRegionInfo() *RegionSegment

func (*GenericRegion) Init

func (_geb *GenericRegion) Init(h *Header, r *_bc.Reader) error

func (*GenericRegion) InitEncode

func (_cdg *GenericRegion) InitEncode(bm *_fd.Bitmap, xLoc, yLoc, template int, duplicateLineRemoval bool) error

func (*GenericRegion) Size

func (_deab *GenericRegion) Size() int

func (*GenericRegion) String

func (_daa *GenericRegion) String() string

type HalftoneRegion

type HalftoneRegion struct {
	DataHeaderOffset     int64
	DataHeaderLength     int64
	DataOffset           int64
	DataLength           int64
	RegionSegment        *RegionSegment
	HDefaultPixel        int8
	CombinationOperator  _fd.CombinationOperator
	HSkipEnabled         bool
	HTemplate            byte
	IsMMREncoded         bool
	HGridWidth           uint32
	HGridHeight          uint32
	HGridX               int32
	HGridY               int32
	HRegionX             uint16
	HRegionY             uint16
	HalftoneRegionBitmap *_fd.Bitmap
	Patterns             []*_fd.Bitmap
	// contains filtered or unexported fields
}

func (*HalftoneRegion) GetPatterns

func (_gef *HalftoneRegion) GetPatterns() ([]*_fd.Bitmap, error)

func (*HalftoneRegion) GetRegionBitmap

func (_cdbe *HalftoneRegion) GetRegionBitmap() (*_fd.Bitmap, error)

func (*HalftoneRegion) GetRegionInfo

func (_dccc *HalftoneRegion) GetRegionInfo() *RegionSegment

func (*HalftoneRegion) Init

func (_gcg *HalftoneRegion) Init(hd *Header, r *_bc.Reader) error
type Header struct {
	SegmentNumber            uint32
	Type                     Type
	RetainFlag               bool
	PageAssociation          int
	PageAssociationFieldSize bool
	RTSegments               []*Header
	HeaderLength             int64
	SegmentDataLength        uint64
	SegmentDataStartOffset   uint64
	Reader                   *_bc.Reader
	SegmentData              Segmenter
	RTSNumbers               []int
	RetainBits               []uint8
}

func NewHeader

func NewHeader(d Documenter, r *_bc.Reader, offset int64, organizationType OrganizationType) (*Header, error)

func (*Header) CleanSegmentData

func (_cece *Header) CleanSegmentData()

func (*Header) Encode

func (_cecg *Header) Encode(w _bc.BinaryWriter) (_adfa int, _cadc error)

func (*Header) GetSegmentData

func (_eaebg *Header) GetSegmentData() (Segmenter, error)

func (*Header) String

func (_ccfa *Header) String() string

type OrganizationType

type OrganizationType uint8
const (
	ORandom OrganizationType = iota
	OSequential
)

type PageInformationSegment

type PageInformationSegment struct {
	PageBMHeight int
	PageBMWidth  int
	ResolutionX  int
	ResolutionY  int

	DefaultPixelValue uint8

	IsLossless    bool
	IsStripe      bool
	MaxStripeSize uint16
	// contains filtered or unexported fields
}

func (*PageInformationSegment) CombinationOperator

func (_bfga *PageInformationSegment) CombinationOperator() _fd.CombinationOperator

func (*PageInformationSegment) CombinationOperatorOverrideAllowed

func (_ggbd *PageInformationSegment) CombinationOperatorOverrideAllowed() bool

func (*PageInformationSegment) Encode

func (_bfgbfa *PageInformationSegment) Encode(w _bc.BinaryWriter) (_dgge int, _gdb error)

func (*PageInformationSegment) Init

func (_egec *PageInformationSegment) Init(h *Header, r *_bc.Reader) (_bccd error)

func (*PageInformationSegment) Size

func (_eecd *PageInformationSegment) Size() int

func (*PageInformationSegment) String

func (_cgb *PageInformationSegment) String() string

type Pager

type Pager interface {
	GetSegment(int) (*Header, error)
	GetBitmap() (*_fd.Bitmap, error)
}

type PatternDictionary

type PatternDictionary struct {
	DataHeaderOffset int64
	DataHeaderLength int64
	DataOffset       int64
	DataLength       int64
	GBAtX            []int8
	GBAtY            []int8
	IsMMREncoded     bool
	HDTemplate       byte
	HdpWidth         byte
	HdpHeight        byte
	Patterns         []*_fd.Bitmap
	GrayMax          uint32
	// contains filtered or unexported fields
}

func (*PatternDictionary) GetDictionary

func (_eba *PatternDictionary) GetDictionary() ([]*_fd.Bitmap, error)

func (*PatternDictionary) Init

func (_acc *PatternDictionary) Init(h *Header, r *_bc.Reader) error

type RegionSegment

type RegionSegment struct {
	BitmapWidth        uint32
	BitmapHeight       uint32
	XLocation          uint32
	YLocation          uint32
	CombinaionOperator _fd.CombinationOperator
	// contains filtered or unexported fields
}

func NewRegionSegment

func NewRegionSegment(r *_bc.Reader) *RegionSegment

func (*RegionSegment) Encode

func (_cecd *RegionSegment) Encode(w _bc.BinaryWriter) (_afae int, _bfbe error)

func (*RegionSegment) Size

func (_acbb *RegionSegment) Size() int

func (*RegionSegment) String

func (_ffcd *RegionSegment) String() string

type Regioner

type Regioner interface {
	GetRegionBitmap() (*_fd.Bitmap, error)
	GetRegionInfo() *RegionSegment
}

type SegmentEncoder

type SegmentEncoder interface {
	Encode(_dgfda _bc.BinaryWriter) (_bfda int, _ccee error)
}

type Segmenter

type Segmenter interface {
	Init(_agcg *Header, _agcc *_bc.Reader) error
}

type SymbolDictionary

type SymbolDictionary struct {
	SdrTemplate int8
	SdTemplate  int8

	SdHuffAggInstanceSelection  bool
	SdHuffBMSizeSelection       int8
	SdHuffDecodeWidthSelection  int8
	SdHuffDecodeHeightSelection int8
	UseRefinementAggregation    bool
	IsHuffmanEncoded            bool
	SdATX                       []int8
	SdATY                       []int8
	SdrATX                      []int8
	SdrATY                      []int8
	NumberOfExportedSymbols     uint32
	NumberOfNewSymbols          uint32
	Header                      *Header
	// contains filtered or unexported fields
}

func (*SymbolDictionary) Encode

func (_efdf *SymbolDictionary) Encode(w _bc.BinaryWriter) (_ecdg int, _gaeb error)

func (*SymbolDictionary) GetDictionary

func (_cgad *SymbolDictionary) GetDictionary() ([]*_fd.Bitmap, error)

func (*SymbolDictionary) Init

func (_cbgc *SymbolDictionary) Init(h *Header, r *_bc.Reader) error

func (*SymbolDictionary) InitEncode

func (_fgba *SymbolDictionary) InitEncode(symbols *_fd.Bitmaps, symbolList []int, symbolMap map[int]int, unborderSymbols bool) error

func (*SymbolDictionary) String

func (_ecbd *SymbolDictionary) String() string

type TableSegment

type TableSegment struct {
	// contains filtered or unexported fields
}

func (*TableSegment) HtHigh

func (_gdda *TableSegment) HtHigh() int32

func (*TableSegment) HtLow

func (_adba *TableSegment) HtLow() int32

func (*TableSegment) HtOOB

func (_agaf *TableSegment) HtOOB() int32

func (*TableSegment) HtPS

func (_feec *TableSegment) HtPS() int32

func (*TableSegment) HtRS

func (_ggcf *TableSegment) HtRS() int32

func (*TableSegment) Init

func (_fdff *TableSegment) Init(h *Header, r *_bc.Reader) error

func (*TableSegment) StreamReader

func (_dcf *TableSegment) StreamReader() *_bc.Reader

type TextRegion

type TextRegion struct {
	RegionInfo              *RegionSegment
	SbrTemplate             int8
	SbDsOffset              int8
	DefaultPixel            int8
	CombinationOperator     _fd.CombinationOperator
	IsTransposed            int8
	ReferenceCorner         int16
	LogSBStrips             int16
	UseRefinement           bool
	IsHuffmanEncoded        bool
	SbHuffRSize             int8
	SbHuffRDY               int8
	SbHuffRDX               int8
	SbHuffRDHeight          int8
	SbHuffRDWidth           int8
	SbHuffDT                int8
	SbHuffDS                int8
	SbHuffFS                int8
	SbrATX                  []int8
	SbrATY                  []int8
	NumberOfSymbolInstances uint32

	SbStrips        int8
	NumberOfSymbols uint32
	RegionBitmap    *_fd.Bitmap
	Symbols         []*_fd.Bitmap

	Header *Header
	// contains filtered or unexported fields
}

func (*TextRegion) Encode

func (_afca *TextRegion) Encode(w _bc.BinaryWriter) (_acbd int, _febcf error)

func (*TextRegion) GetRegionBitmap

func (_dcff *TextRegion) GetRegionBitmap() (*_fd.Bitmap, error)

func (*TextRegion) GetRegionInfo

func (_beea *TextRegion) GetRegionInfo() *RegionSegment

func (*TextRegion) Init

func (_cbfg *TextRegion) Init(header *Header, r *_bc.Reader) error

func (*TextRegion) InitEncode

func (_bdbe *TextRegion) InitEncode(globalSymbolsMap, localSymbolsMap map[int]int, comps []int, inLL *_fd.Points, symbols *_fd.Bitmaps, classIDs *_gc.IntSlice, boxes *_fd.Boxes, width, height, symBits int)

func (*TextRegion) String

func (_fgdcf *TextRegion) String() string

type Type

type Type int
const (
	TSymbolDictionary                         Type = 0
	TIntermediateTextRegion                   Type = 4
	TImmediateTextRegion                      Type = 6
	TImmediateLosslessTextRegion              Type = 7
	TPatternDictionary                        Type = 16
	TIntermediateHalftoneRegion               Type = 20
	TImmediateHalftoneRegion                  Type = 22
	TImmediateLosslessHalftoneRegion          Type = 23
	TIntermediateGenericRegion                Type = 36
	TImmediateGenericRegion                   Type = 38
	TImmediateLosslessGenericRegion           Type = 39
	TIntermediateGenericRefinementRegion      Type = 40
	TImmediateGenericRefinementRegion         Type = 42
	TImmediateLosslessGenericRefinementRegion Type = 43
	TPageInformation                          Type = 48
	TEndOfPage                                Type = 49
	TEndOfStrip                               Type = 50
	TEndOfFile                                Type = 51
	TProfiles                                 Type = 52
	TTables                                   Type = 53
	TExtension                                Type = 62
	TBitmap                                   Type = 70
)

func (Type) String

func (_fccb Type) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL