Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Reading, writing and previewing abr-files (brushes) - How?

Contributor ,
Sep 15, 2016 Sep 15, 2016

I can't find any information in the manual about how to work with brush files - so how exactly does people approach this?

I have an idea for a tool I want to make but I'm blocked in regards to the technical approach on how to actually work with brush files.

I've seen examples of custom-made brush panels so I know it's entirely possible - but I can't seem to find any actual info about it. I've tried contacting these people but they are either busy or they simply do not want to share this info out of fear that I will develop some competing tool (which I will not - my idea goes beyond just a brush manager). What I need to be able to do is

1) Read an abr file

2) Display the brush (as a thumbnail)

3) Write an abr-file

TOPICS
Actions and scripting
4.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Sep 15, 2016 Sep 15, 2016

Is that not what the Preset Manager does?

Capture.jpg

JJMack
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Sep 17, 2016 Sep 17, 2016

Correct.

Do you have the source code?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 15, 2016 Sep 15, 2016

Here is some information about the .abr file structure:

- A brush file starts with a header: version (2-byte big-endian integer) followed by sub-version (2-byte big-endian integer).

- Atfer the header lies a sequence of sections organized by key: 'samp', 'patt' and 'desc' (I'm not sure if their order is fixed though).

Each of them follows the same structure:

   - Photoshop resource signature ('8BIM')

   - 4-character key ('samp' or 'patt' or 'desc')

   - length of data (4-byte big-endian integer)

   - data (variable size)

- The 'samp' section data (if not empty) represents a series of sampled brushes with unique identifiers (UUID) referenced in the descriptor.

- The 'patt' section data (if not empty) represents a series of patterns (used for textures) with unique identifiers (UUID) referenced in the descriptor.

- The 'desc' section data is a flatten descriptor which can be decoded using the fromStream method.

I already wrote a very simple script which uses this information, but unfortunately it doesn't parse what you are interested in, i.e. the brush previews...

<http://www.tonton-pixel.com/blog/wp-content/uploads/test-parse-abr-file.zip >

An old version of the "Adobe  Photoshop®6.0 File Formats Specification" document has a section about brushes:

<http://oldschoolprg.x10.mx/downloads/ps6ffspecsv2.pdf >

There is an open-source project called ABR Viewer:

<abrViewer.NET - Browse /abrViewer.NET_2.0/abrViewer.NET 2.0 at SourceForge.net >

which provides relevant information about the "8BIMsamp" section in the file "ScanningProcess.cs" inside the "abrViewerNET20_source.zip" archive.

Also, the "8BIMpatt" section data structure may be similar to the way patterns are stored at the beginning of a styles file.

See "Photoshop Styles File Format" in <http://www.tonton-pixel.com/blog/documentation/>

HTH...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Sep 17, 2016 Sep 17, 2016
LATEST

This is what I feared - having to write everything from scratch myself.

Also no file previewer which is a big bummer I'll read those links though.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines