psdkit library

A pure Dart PSD and PSB reader and writer without Flutter or native code.

Classes

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.
PsdAdjustment
Base type for editable Photoshop fill and adjustment settings.
PsdAdjustmentCodec
Encodes and decodes Photoshop fill and adjustment-layer blocks.
PsdAlphaChannelDisplay
Display color and opacity for one alpha channel.
PsdBinaryMetadataResource
Document metadata whose external binary standard is retained verbatim.
PsdBrightnessContrastAdjustment
Brightness/contrast values stored in a brit block.
PsdByteImageResource
A one-byte image-resource value.
PsdByteListImageResource
A sequence of one-byte values consuming the complete payload.
PsdChannel
Uncompressed samples for one layer channel.
PsdChannelMixerAdjustment
Channel-mixer settings stored in a mixr block.
PsdChannelMixerOutput
One output channel in a channel-mixer adjustment.
PsdCodec
Reads and writes complete PSD and PSB byte streams.
PsdColorBalanceAdjustment
Color-balance settings stored in a blnc block.
PsdColorBalanceValues
A cyan/red, magenta/green, and yellow/blue correction triplet.
PsdCurve
A point curve associated with one Photoshop channel index.
PsdCurvesAdjustment
Point curves stored in a curv adjustment block.
PsdDescriptorAdjustment
A fill or adjustment represented by an Adobe action descriptor.
PsdDescriptorImageResource
A versioned Photoshop action descriptor stored as an image resource.
PsdDescriptorSmartObject
Modern descriptor-backed smart-object data from SoLd or SoLE.
PsdDisplayInfo
Versioned display settings for alpha channels.
PsdDocument
An in-memory PSD or PSB document.
PsdDocumentCodec
Converts complete PSD and PSB documents through the dart:convert API.
PsdEffectColor
An RGBA color used by a layer effect.
PsdEffectGradient
A Photoshop custom gradient used by an effect.
PsdEffectPattern
A Photoshop pattern reference used by a layer effect.
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.
PsdExposureAdjustment
Exposure values stored as signed 16.16 fixed-point numbers.
PsdFilterEffect
One instance's unfiltered projected cache and optional shared filter mask.
PsdFilterEffectChannel
A compressed filter-cache plane, inflated only on explicit request.
PsdFilterEffectMask
The independently bounded, shared mask following a filter pixel cache.
PsdFilterEffects
Versioned collection of instance caches in an FEid or FXid block.
PsdFilterEffectsCodec
Bounded framing for Photoshop filter caches, without eager pixel inflation.
PsdGlobalTextEngineData
Document-level Photoshop Txt2 text-engine data.
PsdGradientColorStop
One color stop in a Photoshop gradient.
PsdGradientOpacityStop
One opacity stop in a Photoshop gradient.
PsdGridAndGuides
Grid spacing and document guides.
PsdGuide
One horizontal or vertical document guide.
PsdHalftoneScreen
One plate's halftone-screen settings.
PsdHalftoneScreens
Halftone screens stored for one or more color plates.
PsdHueSaturationAdjustment
Modern hue/saturation settings stored in a hue2 block.
PsdHueSaturationRange
One editable color range in a hue/saturation adjustment.
PsdHueSaturationValues
Three signed hue, saturation, and lightness values.
PsdIccProfileResource
Header information and complete bytes of an ICC profile.
PsdImageResource
An opaque Photoshop image resource block.
PsdImageResourceCodec
Encodes and decodes semantic Photoshop image-resource payloads.
PsdImageResourceColor
A Photoshop color-space code and four unsigned components.
PsdImageResourceData
Semantic or explicitly opaque payload of one image-resource block.
PsdImageResourceIds
Standard Photoshop image-resource identifiers.
PsdIntegerImageResource
A signed four-byte image-resource value.
PsdIntegerListImageResource
A sequence of fixed-width unsigned integers.
PsdInvertAdjustment
An invert adjustment, whose nvrt payload is normally empty.
PsdLayer
A Photoshop layer record and its decoded channels.
PsdLayerCompBlendOptions
Editable blending properties captured for one layer composition.
PsdLayerCompBlendRange
One source-and-destination Blend If range captured by a composition.
PsdLayerCompLayerData
Per-layer Photoshop composition metadata stored in one cmls entry.
PsdLayerCompLayerState
Captured values shared by one or more composition identifiers on a layer.
PsdLayerCompsCodec
Encodes and decodes per-layer Photoshop shmd/cmls metadata.
PsdLayerEffect
One semantic Photoshop effect backed by its complete action descriptor.
PsdLayerEffects
A complete editable modern or imported legacy layer-effects record.
PsdLayerEffectsCodec
Encodes and decodes modern lfx2 and historical lrFX records.
PsdLayerMask
Parsed layer-mask metadata.
PsdLegacyPlacedLayer
Historical plLd placed-layer data used before Photoshop CS3.
PsdLegacyTextColor
Color value stored by the Photoshop 5.x tySh format.
PsdLegacyTextFace
One font face stored by the Photoshop 5.x tySh format.
PsdLegacyTextLine
One line record stored by the Photoshop 5.x tySh format.
PsdLegacyTextStyle
One style record stored by the Photoshop 5.x tySh format.
PsdLegacyTypeTool
Complete structural representation of Photoshop 5.x tySh data.
PsdLegacyTypeToolCodec
Encodes and decodes the published Photoshop 5.x tySh structure.
PsdLevelRecord
One channel record in a levels adjustment.
PsdLevelsAdjustment
The fixed and extended channel records stored in a levl block.
PsdLinkedResource
An embedded, external, or alias-linked Photoshop file resource.
PsdLinkedResourceBlock
A complete lnkD, lnk2, or lnk3 document block.
PsdLinkedResourceCodec
Encodes and decodes document-level linked-resource blocks.
PsdLinkedResourceEntry
Base type for one length-prefixed entry in a linked-resource block.
PsdLinkedResourceTimestamp
One calendar timestamp stored by an external linked resource.
PsdMemoryPlanarSource
Adapts an in-memory plane to the progressive writer.
PsdNamedPath
One named document path stored as an image resource.
PsDoubleValue
A double-precision descriptor number.
PsdPathImageResource
Working or saved vector path stored in image resources.
PsdPhotoFilterAdjustment
Photo-filter settings retaining either the version-2 or version-3 color.
PsdPixelAspectRatio
Pixel aspect ratio with its Photoshop resource version.
PsdPixels
Converts decoded PSD channels into display-ready RGBA pixels.
PsdPlacedTransform
Eight transform coordinates ordered by the four placed-image corners.
PsdPlanarSource
Supplies uncompressed big-endian samples for one planar channel.
PsdPrintFlags
Boolean flags from Photoshop's page-setup dialog.
PsdPrintFlagsInfo
Extended crop-mark and bleed print settings.
PsdPrintScale
Page position and scale used when printing.
PsdRandomAccessOutput
Receives PSD bytes while allowing earlier length fields to be patched.
PsdRawAdjustment
A recognized adjustment whose undocumented structure is retained verbatim.
PsdRawImageResource
Bytes belonging to an unknown or private resource format.
PsdRawLinkedResource
One opaque linked-resource entry retained with its exact body.
PsdRawSmartObject
Loss-preserving smart-object data whose structure could not be decoded.
PsdReadOptions
Limits untrusted input before allocating decoded image buffers.
PsdRectangle
A rectangle in document pixel coordinates.
PsdResolutionInfo
Photoshop fixed-point document resolution and units.
PsdRgbaImage
An 8-bit, straight-alpha RGBA pixel buffer.
PsdSelectiveColorAdjustment
Selective-color settings stored in a selc block.
PsdSelectiveColorCorrection
A cyan, magenta, yellow, and black selective-color correction.
PsdShortImageResource
A two-byte image-resource value.
PsdSingleValueAdjustment
A single unsigned 16-bit adjustment value.
PsdSlicesResource
Modern Photoshop slice data stored as a descriptor.
PsdSmartFilter
One Photoshop smart filter stored inside a placed-layer descriptor.
PsdSmartFilterStack
The shared settings and ordered filters attached to one smart object.
PsdSmartObjectCodec
Encodes and decodes smart-object layer metadata.
PsdSmartObjectLayerData
Base type for modern, legacy, and opaque smart-object layer data.
PsdStreamChannel
Associates a layer channel identifier with progressive sample storage.
PsdStreamDocument
Describes a PSD or PSB whose pixel planes can be read incrementally.
PsdStreamLayer
Combines layer metadata with independently supplied channel samples.
PsdStringListImageResource
A list of Pascal or UTF-16 image-resource strings.
PsdStyleLibrary
A decoded Photoshop ASL library with its embedded pattern section.
PsdStyleLibraryCodec
Encodes and decodes Photoshop .asl style libraries.
PsdStylePreset
One loss-preserving Photoshop layer-style preset.
PsdTaggedBlock
An opaque additional-layer-information block.
PsdTextBounds
Four single-precision bounds stored at the end of a TySh block.
PsdTextBox
Rectangle used by text-engine box geometry.
PsdTextColor
A text color retaining its original grayscale, RGB, or CMYK space.
PsdTextContent
Semantic, application-friendly representation of a Photoshop text layer.
PsdTextDescriptorBounds
Bounds stored inside the type-tool action descriptor.
PsdTextEngine
Parses and updates Adobe text-engine data without normalizing unknown keys.
PsdTextEngineName
A slash-prefixed PostScript name found in decoded Adobe text-engine data.
PsdTextFont
Font metadata referenced by a Photoshop text style.
PsdTextGridInfo
Baseline-grid settings stored in Adobe text-engine data.
PsdTextImageResource
A single Unicode or UTF-8 image-resource string.
PsdTextParagraph
A UTF-16 code-unit range sharing one paragraph style.
PsdTextParagraphAdjustments
Paragraph adjustments applied by the Adobe text engine.
PsdTextPoint
A two-dimensional point used by text-engine shape metadata.
PsdTextSpacing
Three values used for minimum, desired, and maximum text spacing.
PsdTextStyle
Formatting applied to a range of Photoshop text.
PsdTextStyleRun
A UTF-16 code-unit range sharing one text style.
PsdTextTransform
Six-value affine transform stored by a Photoshop type tool.
PsdTextUnitValue
A numeric type-tool descriptor value carrying a Photoshop unit.
PsdTextWarp
Common editable properties of a Photoshop text-warp descriptor.
PsdThumbnailResource
Photoshop thumbnail header and encoded or raw pixel data.
PsdTransferFunction
One plate's transfer curve.
PsdTransferFunctions
Transfer functions stored for one or more color plates.
PsdTypeTool
Editable contents of a Photoshop TySh tagged block.
PsdTypeToolCodec
Encodes and decodes the documented TySh structure.
PsdUrlItem
One entry in Photoshop's URL list.
PsdUrlList
Ordered Photoshop URL-list entries.
PsdVectorMask
A layer vector-mask header and its editable path.
PsdVectorMaskCodec
Encodes and decodes vmsk and vsms layer blocks.
PsdVersionInfo
Photoshop application version information.
PsdWriteOptions
Controls container version and default compression during encoding.
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

PsdAdjustmentType
Identifies a Photoshop fill or adjustment-layer family.
PsdColorMode
Identifies the document colour model.
PsdCompression
Selects the compression used for a channel or merged image.
PsDescriptorAccessMode
Selects whether descriptor accessors accept compatible scalar encodings.
PsdGradientStyle
Geometry used by a gradient effect.
PsdGuideDirection
Direction of a Photoshop guide.
PsdImageResourceListLayout
Controls the count prefix used by an integer-list resource.
PsdLayerEffectType
Identifies a Photoshop layer-effect family.
PsdLinkedResourceType
Identifies the content storage strategy of a linked Photoshop resource.
PsdPrintScaleStyle
Describes the placement policy used for printing.
PsdSectionType
Describes the semantic role of a layer record in a group hierarchy.
PsdStrokePosition
Placement of a Photoshop layer stroke.
PsdTextAntiAlias
Antialiasing mode requested for editable Photoshop text.
PsdTextColorSpace
Color space retained from an Adobe text-engine color value.
PsdTextGridding
Pixel-grid behavior stored by a Photoshop text descriptor.
PsdTextJustification
Paragraph alignment stored by the Adobe text engine.
PsdTextOrientation
Direction in which Photoshop lays out a text layer.
PsdTextShapeType
Geometry used by the Photoshop text engine.
PsdTextWarpStyle
Warp preset stored by a Photoshop type tool.
PsdVersion
Selects the classic PSD or large-document PSB container.
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

PsdDocumentImageResources on PsdDocument
Convenient semantic access and replacement on complete documents.
PsDescriptorAccess on PsDescriptor
Provides null-safe typed projections over Photoshop Action Descriptors.
PsDescriptorValueAccess on PsDescriptorValue?
Provides typed projections for an individual nullable descriptor value.
PsdImageResourceDecoding on PsdImageResource
Convenient semantic access and replacement on a resource block.
PsdLayerLayerComps on PsdLayer
Convenient layer-composition access on individual layer records.

Constants

psdAdjustmentKeys → const Set<String>
Keys used by Photoshop fill and adjustment layers.
psdDocumentCodec → const PsdDocumentCodec
Converts complete PSD and PSB documents with the default options.
psdFilterEffectsKeys → const Set<String>
Document-level pixel-cache keys used by Photoshop smart filters.
psdLinkedResourceKeys → const Set<String>
Keys used by Photoshop linked-resource blocks at document level.
psdSmartObjectLayerKeys → const Set<String>
Keys used by modern and legacy Photoshop smart-object layer blocks.
psMaxExactInteger → const int
Largest integer this platform represents exactly.
psMinExactInteger → const int
Smallest integer this platform represents exactly.

Typedefs

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.
PsdBezierKnot = PsBezierKnot
One cubic Bézier knot with incoming and outgoing control handles.
PsdBezierKnotRecord = PsBezierKnotRecord
A record containing one cubic Bézier knot.
PsdCurvePoint = PsToneCurvePoint
Backward-compatible name for a shared Photoshop tone-curve point.
PsdLayerCompPoint = ({double horizontal, double vertical})
A finite point stored in Photoshop layer-composition metadata.
PsdPathClipboardRecord = PsPathClipboardRecord
A clipboard-bounds and resolution path record.
PsdPathFillRule = PsPathFillRule
Fill rule inferred from a Photoshop subpath's flags.
PsdPathFillRuleRecord = PsPathFillRuleRecord
A path fill-rule record.
PsdPathInitialFillRecord = PsPathInitialFillRecord
The initial fill state used before applying subpath operations.
PsdPathOperation = PsPathOperation
Boolean operation applied when a Photoshop subpath is combined.
PsdPathPoint = PsPathPoint
A two-dimensional point in Photoshop path coordinates.
PsdPathRecord = PsPathRecord
Base type for one fixed-size Photoshop path record.
PsdSubpath = PsSubpath
One open or closed contour inside a Photoshop path.
PsdSubpathLengthRecord = PsSubpathLengthRecord
A record declaring the knot count and operation of a subpath.
PsdUnknownPathRecord = PsUnknownPathRecord
An unrecognized 26-byte Photoshop path record.
PsdVectorPath = PsVectorPath
An ordered Photoshop path retaining every fixed-size source record.
PsdVectorPathCodec = PsVectorPathCodec
Encodes and decodes streams of 26-byte Photoshop path records.
PsdVersionedDescriptor = PsVersionedDescriptor
Backward-compatible name for a shared versioned Action Descriptor.
PsdWriteProgress = void Function(int completedRows, int totalRows)
Reports completed and total source rows during progressive encoding.
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

PsFormatException
Reports malformed, truncated, or unsupported Photoshop-format input.
PsWriteException
Reports data that cannot be represented by a requested Photoshop format.