Hey – firstly, thanks for the awesome package!
I have been trying to access the imageData of a linked Smart Object to get the full-size composite from the top-level data of the psb, but am noticing that this imageData often returns just blank white pixel data.
In the screenshots below, I am logging out the imageData from the same Smart Object – in the first screenshot, the Smart Object contains four individual layers and returns image data of all 255, 255, 255 (white).
After flattening the four layers of the Smart Object in Photoshop and parsing again, the same imageData property correctly returns the expected pixel data. In the second screenshot you can see it is different colours, not all 255, 255, 255.
Is it expected that the imageData at the top level of a linked Smart Object file would behave like this? It would be awesome to be able to consistently access a composite that is the full size of the Smart Object file.
Here is how I access it currently for the above logs:
const linkedPsd = await readPsd(linkedFile.data, { useImageData: true });
const { imageData } = linkedPsd;
console.log('IMAGE DATA: ', imageData);
Here is a PSD that contains the Smart Object I was flattening to see the difference in imageData: https://drive.google.com/file/d/1GTsh8YVwBLO-CgGk5tr5hc8UciFgvoc0/view?usp=sharing
I process it further after to generate the images, which reflect that one is all white and the other is correct to the Smart Object contents.
This is the output with multiple layers in the Smart Object (all white):
And the output when the layers are flattened:

Hey – firstly, thanks for the awesome package!
I have been trying to access the
imageDataof a linked Smart Object to get the full-size composite from the top-level data of the psb, but am noticing that thisimageDataoften returns just blank white pixel data.In the screenshots below, I am logging out the
imageDatafrom the same Smart Object – in the first screenshot, the Smart Object contains four individual layers and returns image data of all255, 255, 255(white).After flattening the four layers of the Smart Object in Photoshop and parsing again, the same
imageDataproperty correctly returns the expected pixel data. In the second screenshot you can see it is different colours, not all255, 255, 255.Is it expected that the
imageDataat the top level of a linked Smart Object file would behave like this? It would be awesome to be able to consistently access a composite that is the full size of the Smart Object file.Here is how I access it currently for the above logs:
const linkedPsd = await readPsd(linkedFile.data, { useImageData: true });const { imageData } = linkedPsd;console.log('IMAGE DATA: ', imageData);Here is a PSD that contains the Smart Object I was flattening to see the difference in
imageData: https://drive.google.com/file/d/1GTsh8YVwBLO-CgGk5tr5hc8UciFgvoc0/view?usp=sharingI process it further after to generate the images, which reflect that one is all white and the other is correct to the Smart Object contents.
This is the output with multiple layers in the Smart Object (all white):
And the output when the layers are flattened: