AtnKit
AtnKit is a pure Dart codec for Adobe Photoshop Actions (.atn) files. It reads and writes version 12 and 16 action sets, exposes immutable actions and events, and delegates version 16 Photoshop Action Descriptor values to package:pscore.
Supported data
- Version 12 and 16 files containing one named action set and its ordered actions. Version 12 was found in a Photoshop 5 action file; new files default to version 16.
- Action indices, names, expanded state, function-key shortcuts, Shift modifiers, and color labels.
- Ordered action events with enabled, dialog, and expansion flags.
- Both
TEXTstring identifiers and compactlongfour-character identifiers. - Optional Photoshop Action Descriptors, including the compact version 12 layout and version 16 descriptors through PsCore.
- Unknown Photoshop commands retained through their identifiers, display names, flags, and typed descriptors.
- Configurable limits for file size, names, actions, events, text fields, and descriptor collections.
- Optional preservation of trailing bytes for forensic round trips.
- Canonical ATN writing and reusable
dart:convertcodec support.
ATN does not provide a length around each event descriptor. When an unknown descriptor type makes the next event boundary unknowable, AtnKit fails explicitly instead of scanning for a guessed boundary.
Usage
import 'dart:io';
import 'package:atnkit/atnkit.dart';
final AtnFile file = AtnDecoder.decode(
await File('Retouching.atn').readAsBytes(),
);
for (final AtnAction action in file.actionSet.actions) {
print('${action.name}: ${action.events.length} events');
}
await File('Copy.atn').writeAsBytes(AtnEncoder.encode(file));
See docs/ATN.md for the supported binary layout, boundary rules, and integration policy.
AtnKit is an independent implementation and is not affiliated with or endorsed by Adobe.
Built for Focale, an advanced local image editor. Discover what these packages make possible in a real creative workflow.
Libraries
- atnkit
- Reads, writes, and inspects Adobe Photoshop ATN action-set files.