patkit library

Reads and writes Adobe Photoshop PAT pattern libraries in pure Dart.

Classes

PatCodec
Converts PAT models to and from their binary representation.
PatDecodeOptions
Resource and preservation limits applied while decoding a PAT library.
PatDecoder
Decodes Adobe Photoshop 8BPT pattern libraries.
PatEncodeOptions
Preservation and validation choices applied while encoding a PAT library.
PatEncoder
Encodes immutable PAT models into standalone Photoshop pattern libraries.
PatFile
Complete decoded contents of one Adobe Photoshop pattern library.
PatHierarchyEntry
One ordered item from a trailing Photoshop phry hierarchy descriptor.
PatWarning
Describes a recoverable compatibility issue found while decoding.
PsAliasValue
Opaque length-prefixed platform alias data.
PsBezierKnot
One cubic Bézier knot with incoming and outgoing control handles.
PsBezierKnotRecord
A record containing one cubic Bézier knot.
PsBinaryReader
Bounds-checked big-endian input used by Photoshop format parsers.
PsBinaryWriter
Growable big-endian output used by the PSD writer.
PsBooleanValue
A one-byte descriptor Boolean.
PsClassValue
A Photoshop class name and identifier.
PsDescriptor
A Photoshop action descriptor containing ordered, typed items.
PsDescriptorCodec
Encodes and decodes Photoshop action descriptors.
PsDescriptorDecodeOptions
Resource limits applied while decoding an Action Descriptor.
PsDescriptorEnumeration
A Photoshop enumeration represented by its type and selected identifiers.
PsDescriptorItem
One keyed value inside a Photoshop action descriptor.
PsDescriptorNumber
A descriptor number paired with its optional Photoshop unit identifier.
PsDescriptorValue
Base type for Photoshop action-descriptor values.
PsDoubleValue
A double-precision descriptor number.
PsEnumeratedReferenceValue
An enumerated form inside a Photoshop object reference.
PsEnumeratedValue
A pair of Photoshop type and enumeration identifiers.
PsIdentifierValue
An integer identifier form inside a Photoshop object reference.
PsIndexValue
An integer index form inside a Photoshop object reference.
PsIntegerValue
A signed 32-bit descriptor integer.
PsLargeIntegerValue
A signed 64-bit descriptor integer.
PsListValue
An ordered list of independently typed descriptor values.
PsNameValue
A Unicode name form inside a Photoshop object reference.
PsObjectArrayValue
A descriptor-shaped object array with an explicit element count.
PsObjectValue
A nested action descriptor.
PsOffsetValue
An offset form inside a Photoshop object reference.
PsPackBitsCodec
Encodes and decodes the PackBits run-length format used by Photoshop.
PsPathClipboardRecord
A clipboard-bounds and resolution path record.
PsPathFillRuleRecord
A path fill-rule record, whose defined payload is normally all zeroes.
PsPathInitialFillRecord
The initial fill state used before applying subpath operations.
PsPathPoint
A two-dimensional point in Photoshop path coordinates.
PsPathRecord
Base type for one fixed-size Photoshop path record.
PsPathValue
Opaque length-prefixed Photoshop descriptor path data.
PsPattern
A complete Photoshop pattern record with its source planes and metadata.
PsPatternBlockDecoder
Decodes four-byte-aligned length-prefixed pattern records from Photoshop blocks.
PsPatternBlockDecodeResult
Every pattern decoded from a length-prefixed block and its retained byte cost.
PsPatternBlockEncoder
Encodes length-prefixed, four-byte-aligned embedded pattern records.
PsPatternChannel
One decoded or preserved virtual-memory channel from a Photoshop pattern.
PsPatternChannelSlot
One of the declared channel slots in a Photoshop virtual-memory array.
PsPatternDecodeOptions
Resource and preservation limits for one Photoshop pattern record.
PsPatternDecodeResult
One decoded pattern together with its retained uncompressed-byte cost.
PsPatternEncodeOptions
Preservation and validation choices applied while encoding pattern records.
PsPatternImage
A rendered row-major RGBA image suitable for editor integration.
PsPatternIndexedMetadata
The four bytes following an indexed pattern's 256-entry palette.
PsPatternRecordDecoder
Decodes the shared versioned pattern-record structure used by Photoshop formats.
PsPatternRecordEncoder
Encodes the pattern-record structure shared by PAT, ABR, ASL, and PSD data.
PsPresetHierarchyEntry
One ordered item from a Photoshop phry hierarchy descriptor.
PsPresetHierarchyMapper
Converts a generic Photoshop phry descriptor into typed hierarchy entries.
PsPresetIdentity
The identity fields used to resolve a hierarchy entry to a preset.
PsPropertyValue
A property form inside a Photoshop object reference.
PsRawValue
Opaque length-prefixed descriptor data.
PsRectangle
A rectangle using Photoshop's inclusive top/left and exclusive bottom/right convention.
PsReferenceClassValue
A class form inside a Photoshop object reference.
PsReferenceValue
An ordered Photoshop object reference.
PsRgbColor
An eight-bit red, green, and blue color returned by a color converter.
PsStringValue
A UTF-16 Photoshop descriptor string.
PsSubpath
One open or closed contour inside a Photoshop path.
PsSubpathLengthRecord
A record declaring the knot count and operation of a subpath.
PsTaggedBlock
One Photoshop tagged block with loss-preserving source metadata.
PsTaggedBlockCodec
Reads, writes, and recognizes Photoshop tagged-block framing.
PsTaggedBlockHeader
A decoded tagged-block header whose payload has not yet been consumed.
PsToneCurve
An immutable Photoshop tone curve with evaluation helpers.
PsToneCurveCodec
Encodes and decodes count-prefixed Photoshop tone-curve point records.
PsToneCurvePoint
One input-to-output control point in a Photoshop tone curve.
PsUnitFloatsValue
A list of double-precision values sharing a Photoshop unit code.
PsUnitFloatValue
A double-precision number carrying a Photoshop unit code.
PsUnknownPathRecord
An unrecognized 26-byte Photoshop path record.
PsVectorPath
An ordered Photoshop path retaining every fixed-size source record.
PsVectorPathCodec
Encodes and decodes streams of 26-byte Photoshop path records.
PsVersionedDescriptor
A Photoshop Action Descriptor preceded by its 32-bit format version.
PsVersionedDescriptorCodec
Encodes and decodes 32-bit-versioned Photoshop Action Descriptors.

Enums

PatDecodeMode
Controls whether recoverable PAT compatibility issues stop decoding.
PatEncodeMode
Controls how strongly a PAT library is validated before encoding.
PatHierarchyEntryKind
Identifies the role of one slot in Photoshop's optional pattern hierarchy.
PsDescriptorAccessMode
Selects whether descriptor accessors accept compatible scalar encodings.
PsPathFillRule
Fill rule inferred from Photoshop's subpath flags.
PsPathOperation
Boolean operation applied when Photoshop combines a subpath.
PsPatternColorMode
Identifies the Photoshop color model used by a pattern record.
PsPatternCompression
Identifies the storage method used by a pattern channel.
PsPatternEncodeMode
Controls how strongly a Photoshop pattern record is validated before encoding.
PsPatternRecordKind
Distinguishes standalone PAT records from length-bounded embedded records.
PsPresetHierarchyEntryKind
Identifies the role of one Photoshop preset-hierarchy slot.
PsToneCurveInterpolation
Selects how values between tone-curve control points are calculated.

Extensions

PsDescriptorAccess on PsDescriptor
Provides null-safe typed projections over Photoshop Action Descriptors.
PsDescriptorValueAccess on PsDescriptorValue?
Provides typed projections for an individual nullable descriptor value.

Constants

psMaxExactInteger → const int
Largest integer this platform represents exactly.
psMinExactInteger → const int
Smallest integer this platform represents exactly.

Typedefs

PatColorMode = PsPatternColorMode
Photoshop color model stored by a PAT pattern.
PatCompression = PsPatternCompression
Compression method stored by a PAT pattern channel.
PatIndexedMetadata = PsPatternIndexedMetadata
Indexed palette metadata stored by a standalone PAT record.
PatPattern = PsPattern
One complete pattern preset from a PAT library.
PatPatternChannel = PsPatternChannel
One decoded or preserved PAT channel.
PatPatternChannelSlot = PsPatternChannelSlot
One declared virtual-memory slot belonging to a PAT pattern.
PatPatternImage = PsPatternImage
A rendered RGBA tile suitable for Focale integration.
PatRectangle = PsRectangle
Source-space rectangle stored by PAT virtual-memory data.
PatTaggedBlock = PsTaggedBlock
Backward-compatible name for a shared Photoshop tagged block.
PsCmykToRgbConverter = PsRgbColor Function({required double black, required double cyan, required double magenta, required double yellow})
Converts normalized CMYK ink amounts to an eight-bit RGB color.
PsPatternDecodedBytesGuard = void Function(int bytes, int offset)
Verifies that retaining bytes decoded bytes remains within a caller's aggregate budget.
PsPatternIssueHandler = void Function(String message, int offset)
Receives a recoverable pattern compatibility issue and its absolute byte offset.
PsPresetHierarchyIssueHandler = void Function(String message)
Receives a recoverable preset-hierarchy compatibility issue.
PsTaggedBlockWideLengthResolver = bool Function(String signature, String key)
Determines whether one Photoshop tagged block uses a 64-bit length.

Exceptions / Errors

PatFormatException
Reports malformed, truncated, unsupported, or unsafe PAT input.
PatWriteException
Reports model data that cannot be represented by the requested PAT output.
PsFormatException
Reports malformed, truncated, or unsupported Photoshop-format input.
PsWriteException
Reports data that cannot be represented by a requested Photoshop format.