Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( IHDR = []byte{0x69, 0x68, 0x64, 0x72} // "ihdr" COLR = []byte{0x63, 0x6f, 0x6c, 0x72} // "colr" SOCSIZ = []byte{0xFF, 0x4F, 0xFF, 0x51} COD = []byte{0xFF, 0x52} )
Various hard-coded byte values for finding JP2 boxes
View Source
var JP2HEADER = []byte{
0x00, 0x00, 0x00, 0x0c,
0x6a, 0x50, 0x20, 0x20,
0x0d, 0x0a, 0x87, 0x0a,
}
JP2HEADER contains the raw bytes for the only JP2 header we currently respect
Functions ¶
This section is empty.
Types ¶
type ColorMethod ¶
type ColorMethod uint8
ColorMethod tells us how to determine the colorspace
const ( CMEnumerated ColorMethod = 1 CMRestrictedICC = 2 )
Known color methods
type ColorSpace ¶
type ColorSpace uint8
ColorSpace tells us how to parse color data coming from openjpeg
const ( CSUnknown ColorSpace = iota CSRGB CSGrayScale CSYCC )
Known color spaces
func (ColorSpace) String ¶
func (cs ColorSpace) String() string
String reports the ColorSpace in a human-readable way
type Info ¶
type Info struct { // Main header info Width, Height uint32 Comps uint16 BPC uint8 // Color data ColorMethod ColorMethod ColorSpace ColorSpace Prec, Approx uint8 // From SIZ box - this data can replace the main header data and // some of the colorspace data if necessary LSiz, RSiz uint16 XSiz, YSiz uint32 XOSiz, YOSiz uint32 XTSiz, YTSiz uint32 XTOSiz, YTOSiz uint32 CSiz uint16 // From COD box LCod uint16 SCod uint8 SGCod uint32 Levels uint8 }
Info stores a variety of data we can easily scan from a jpeg2000 header
Click to show internal directories.
Click to hide internal directories.