Photoshop Gradients File Format

Discussion of Photoshop Scripting, Photoshop Actions and Photoshop Automation in General

Moderators: Tom, Kukurykus

Mikaeru

Photoshop Gradients File Format

Post by Mikaeru »

I've just released a new document called Photoshop Custom Shapes File Format (beta version) which is an attempt at deciphering the format of a custom shapes file. There are still a few unknown fields, but it shouldn't be a problem for the time being...

I also quickly wrote a basic script called Parse Custom Shapes File (beta version) making use of the information contained in the document.

Mike Hale wrote:I was hoping that if I could extract the original path info from the custom shape, I would then determine the correct aspect ratio or just use the path itself.
From what I do understand after studying the file format, it probably won't be possible to extract the correct aspect ratio from a custom shapes file because the bounding-box it contains is related to the minimum and maximum coordinates of the *anchor* and *control* points of the path, whereas the bounding-box used at the user-interface level encloses the *outline* of the shape.

Fortunately, it is possible to extract the path itself. I'm going to work on that from now on.

HTH,

--Mikaeru

Professional AI Audio Generation within Adobe Premiere Pro - Download Free Plugin here

Mike Hale

Photoshop Gradients File Format

Post by Mike Hale »

Thank you so much for taking the time with this.

Yes, I wasn't clear when I talked about the aspect ratio. I know that the bounding box in the custom shape file is different than the bounding box in the GUI. But once I can extract the path from the custom I can either get the aspect ratio from the path point or hopefully create a new path use it's bounding box. In the test I did a while back Photoshop seems to store an accurate bounding box with paths created in Photoshop. It may not with paths from other apps.

What I am doing now is making include files that has the correct aspect ratio of the shapes I use and do a look up to match the shape used in the filter. It's a lot of work to generate those data files and extra script complexity that I will be very happy to avoid.

Mike
Mikaeru

Photoshop Gradients File Format

Post by Mikaeru »

Mike Hale wrote:What I am doing now is making include files that has the correct aspect ratio of the shapes I use and do a look up to match the shape used in the filter. It's a lot of work to generate those data files and extra script complexity that I will be very happy to avoid.
Moved to new topic: Photoshop Custom Shapes File Format...