Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
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.9K
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

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
Community Beginner ,
Aug 10, 2025 Aug 10, 2025

I'm looking to pull BrushTip info from an ABR, but have hit a wall. I get the data, can get the name the location of the image, but it just shows a zebra pattern and not the brushTip!
I've looked at most of this info as well. I am missing something.

practice safe design | use a concept
~ Petrula Vrontikis
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
Mentor ,
Aug 10, 2025 Aug 10, 2025

If you get a "zebra", it means that you got to the sample block correctly, but you are decoding it incorrectly. I have not worked with the abr format, but I suspect that there is some compression algorithm, most likely the simplest one like PackBits (the first byte encodes the number of repetitions of the byte following it).

 

Create a simple texture (for example, a 16x16 square with alternating blocks of black and white pixels within it), this will make it easier to find the right decoding algorithm.

 

UPD, i looked at a few samples of brushes, yes, indeed, you can see that some version of PackBits is used there. For example, a 16x16 brush sample is encoded as follows:

jazzy_1-1754846765099.png

fd ff fd 00 fd ff fd 00 fd ff fd 00 fd ff fd 00
fd ff fd 00 fd ff fd 00 fd ff fd 00 fd ff fd 00
fd 00 fd ff fd 00 fd ff fd 00 fd ff fd 00 fd ff
fd 00 fd ff fd 00 fd ff fd 00 fd ff fd 00 fd ff
fd ff fd 00 fd ff fd 00 fd ff fd 00 fd ff fd 00
fd ff fd 00 fd ff fd 00 fd ff fd 00 fd ff fd 00
fd 00 fd ff fd 00 fd ff fd 00 fd ff fd 00 fd ff
fd 00 fd ff fd 00 fd ff fd 00 fd ff fd 00 fd ff

 i.e 1st bit FF+2 (257) - fd (253) = 4, so fd ff = "repeat ff x4"

 

I checked this on several brushes and the compression principle is the same everywhere, except... except for cases when the brush contains colors that are 1-2 bytes in a row:

jazzy_2-1754847273799.png

ff 00 ff ff 00 00 ff ff ff 00 00 00 ff ff ff ff
ff 00 ff ff 00 00 ff ff ff 00 00 00 ff ff ff ff
ff 00 ff ff 00 00 ff ff ff 00 00 00 ff ff ff ff
ff 00 ff ff 00 00 ff ff ff 00 00 00 ff ff ff ff
ff 00 ff ff 00 00 ff ff ff 00 00 00 ff ff ff ff
ff 00 ff ff 00 00 ff ff ff 00 00 00 ff ff ff ff
ff 00 ff ff 00 00 ff ff ff 00 00 00 ff ff ff ff
ff 00 ff ff 00 00 ff ff ff 00 00 00 ff ff ff ff
ff 00 ff ff 00 00 ff ff ff 00 00 00 ff ff ff ff
ff 00 ff ff 00 00 ff ff ff 00 00 00 ff ff ff ff
ff 00 ff ff 00 00 ff ff ff 00 00 00 ff ff ff ff
ff 00 ff ff 00 00 ff ff ff 00 00 00 ff ff ff ff
ff 00 ff ff 00 00 ff ff ff 00 00 00 ff ff ff ff
ff 00 ff ff 00 00 ff ff ff 00 00 00 ff ff ff ff
ff 00 ff ff 00 00 ff ff ff 00 00 00 ff ff ff ff
ff 00 ff ff 00 00 ff ff ff 00 00 00 ff ff ff ff

here we see (even from the code preview) that the bytes literally repeat the sample pixels.

 

If you have figured out the file structure, then perhaps somewhere in the area of the bits indicating the brush size there is a mark about the presence or absence of compression (or this should be judged indirectly, by comparing the length of the sample bytes with the size of the image) 

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
Community Beginner ,
Sep 27, 2025 Sep 27, 2025

So after a lot of searching testing and looking at other apps like BrushBox, I ahve come to realise that using CEP allows you more scope in looking at Preset Manager Data than UXP. UXP is pretty backward when it comes to a lot of requirements of a normal developer enviornment!

practice safe design | use a concept
~ Petrula Vrontikis
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
Valorous Hero ,
Sep 27, 2025 Sep 27, 2025

I didn't notice how old the orginal post was..



Any image can be defined as a brush- I mostly use photoshop elements to do that.
Any number of free apps can view abr files. 

I also bought  a little app for a few dollars that lets me see thumbnails of abr files, and a bunch of ther things as well. 

2025-09-27_153000.png

This may help, in regards to tool development:  I really think you need to be thinking about a plugin fro photoshop.

To become a Photoshop plugin developer, install the UXP Developer Tools from the Adobe Creative Cloud app to create, load, and manage plugins for Photoshop using UXP (Unified Extensibility Platform), which is a modern framework for extending Creative Cloud products. You can build custom panels, dialogs, and direct actions using JavaScript and web technologies like HTML and CSS, and then use the Developer Tool to debug, reload, and manage your plugins. For more complex needs, you can develop hybrid plugins that leverage the existing C++ Photoshop SDK. 
1. Install the UXP Developer Tools 
  • Open the Adobe Creative Cloud application and find "UXP Developer Tools" under the "All apps" section.
  • Install the tools to gain the necessary features for creating and managing plugins. 
2. Get Started with UXP 
  • UXP is the modern framework for creating Photoshop plugins.
  • It allows you to build user interfaces with HTML and CSS and manage plugin logic with JavaScript.
  • You can also develop hybrid plugins that combine UXP with the C++ Photoshop SDK for advanced functionality. 




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
Community Beginner ,
Sep 28, 2025 Sep 28, 2025
LATEST

I know how to create a brush image, it straight forward in Photoshop. the issue is custom brushes are different to ABR brushes and trying to see the brushTip preview in UXP is almost near impossible. Camel/Eye of Needle comes to mind! That is the point of my interest. I know ABRViewer shows the tips, I need to have the code to use in my app to find the tips.

practice safe design | use a concept
~ Petrula Vrontikis
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