I have a code snippet written by r-bin that uses the Action Descriptor fromStream method to extract/convert a chunk of binary data from a local psd-file, to usable information.
With a little adjustment I created my own function to get the desired information. The function is passed a layerID integer which is used to parse and search the binary data for the right chunk of information.
var desc = new ActionDescriptor();
desc.fromStream(buff.substr(n+16));
if (passedLayerID == desc.getInteger(stringIDToTypeID("layerID"))){
// extract additional properties from desc
}else{
// repeat fromStream with updated substring
}
I’m looking for a way to recreate this functionality with batchplay but I don’t know if a similar method exists (let alone the syntax involved in extracting the data). Any help is very much appreciated.