Skip to main content
Inspiring
April 4, 2013
Question

Slices info from PSD document

  • April 4, 2013
  • 1 reply
  • 710 views

Hello everybody,

I'm trying to convert slices info to XMP data, so that they'll be available for further processing with .jsx scripts (Yes, I know I can just save .css and parse it then, but that doesn't suit me for some reasons).

So, I have found the description of slices resource format here

http://www.adobe.com/devnet-apps/photoshop/fileformatashtml/PhotoshopFileFormats.htm#50577409_19931

and implemented processing in my plugin. It worked just fine on some test files I have created from the scratch.

here's memory dump of resource portion

But later I've started testing on some real life files and guess what - resource format is just plain different (see screenshot of memory dump)

So, 2 questions:

1) Is it possible to resave the file somehow so that slices resource will be converted to described format? Saving with 'Maximize compatibility' makes no difference unfortunately.

2) If not, is there updated PSD File Format Specification which describes this new format? I see that it's more intuitive and readable than old one, but still...

best regards,

Evgeny

This topic has been closed for replies.

1 reply

Inspiring
April 5, 2013

actually parsed the version 8 format today.

just can't find how slice ID corresponds to the visible slice number, or where to find it - values after slice or sliceIDlong look way different