Documentation
¶
Overview ¶
Package iccbuild assembles minimal ICC profiles, for tests.
It exists for the reason internal/pdfbuild does: a tag table of offsets and sizes, each tag four-byte aligned, is the only real logic in a hand-built profile, and two packages need it — icc, which parses profiles, and render/native, which draws through them and is compared with pdfium. The corpus's own profiles cannot be committed as fixtures, because they come out of PDFs that cannot be redistributed, so every profile a test uses is built here.
Nothing is validated. A fixture's purpose is often to be malformed in one specific way, and a caller that needs one patches the bytes this returns: the header's class is at offset 12, the data colour space at 16, the connection space at 20, and the 'acsp' signature at 36.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Curve ¶
Curve is a curveType tag holding a sampled table; no entries at all is the identity. #nosec G115 -- a test fixture's table, nowhere near 1<<32 entries
func Gamma ¶
Gamma is a curveType tag of one entry, which the ICC specification reads as a gamma in u8Fixed8.
func Para ¶
Para is a parametricCurveType tag of the function type given, with its parameters in order.
func Profile ¶
Profile returns a version 2 display profile for the data colour space given ("GRAY" or "RGB "), with an XYZ connection space and the tags given after a description, a D50 media white point and a copyright, which is what a real profile carries ahead of the tags that matter. #nosec G115 -- every count and offset is a test fixture's, bytes long and nowhere near 1<<32