How to extract the BrushTip image from brushes in .abr?

Hi All

I’m a complete newbie. I am basically an artist who has been using Photoshop since 2.5 and have always wanted a certain feature, and eventually decided to try making it myself. I have been stumbling for a month now, but the whole thing is working apart from one par (which maybe the most important UI part). I need to extract the BrushTip image from brushes in .abr and .tpl files which have been scanned in my plug-in and listed. The main issue is all the data is there and I can’t figure how to get the image to display.
Can anyone give insight into this? I have looked at the ABRViewer code on GitHub and the online image-viewer. Nothing has worked so I don’t know if I am doing anything wrong. I have found the UUID and the LUT but can’t parse or extract the info to make the PNG to display.
Thanks in advance
Any help would be valuable.

Rob

I think I’ve seen a workaround, but don’t know if it’s the best way

  1. Switch to that brush and create a new document (or vice versa)
  2. Make a single stroke with the brush
  3. Save the image
  4. Close the document
  5. Get that image with the brush shape

I didn’t try it myself and don’t have the code. I don’t know for sure if/how this would work

I’m not sure you understand my question. My plugin scans the ABR file and lists them on the panel I have created. It has the correct name, but can’t show the preview of the BrushTip which is stored in the ABR file. I have attached an image of the panel in BrushBox as an example of what I am looking for. I don’t want to create a brushTip from an image. I know how to do that. I want to be able to display existing BrushTip images from the ABR files I have in my Preset/Brushes folder.

Yes, I understood that. AFAIK it’s not possible, hence the workaround. I’d be glad to be wrong, because I also could make use of it, if it’s possible to get the brush shape directly. Maybe someone would jump in and post some other option :crossed_fingers:

How do apps and plugins like ABR and BrushBox initiate and show the BrushTips?

I think this could be a good starting point Reading, writing and previewing abr-files (brushes... - Adobe Product Community - 8536998

1 Like

Seen a lot of that info and it hasn’t gotten me any closer. :frowning:

They mention pattern files format. And if you see zebra patterns it could be because of compression. You could try packbits compression. I used it in PAT parser here: pat-parser/src/main.ts at master · jardicc/pat-parser · GitHub

1 Like

OK, thanks. Am looking into it. Will post more if it all fails :slight_smile:

So, I’m happy to say after 2 weeks of hard work, I finally got the brushTip image to show. Thanks for those who pointed in the right direction to get the necessary info. This is step one, so now I have to test on other ABR files, and TPL and then implement it into the main plugin. But I am very happy that I got it this far!

2 Likes

What you’ve done is great work. Congratulations.

1 Like

Thanks. Just got to test it out and bug test on other ABR files and I can implement it in the main plug. I was happy with the UI and running of the teaser that I might just bundle it with the main plugin.

1 Like

Hi Rob, when I last looked into this, one of the issues was the different ABR file versions, as they use different code structures. It will be interesting to see what you find with the newer, undocumented ABR/TPL versions.

1 Like

Yep. I did this version based on one V6.2 ABR and it worked fine as in the image. Now I am bug testing on V10 and V6.2 and some things are popping up about file size and dimension. I am slowly working through them. The parser is based on open source I found in a python version of ABR viewer and it said it covers all the versions, even 1 and 2.

I found one more source code: ag-psd/src/abr.ts at master · Agamnentzar/ag-psd · GitHub

2 Likes

Super, will take a look’

A project that displays png thumbnails of ABR files in the browser: GitHub - jlai/brush-viewer: View .abr brush images in your browser and extract/save alpha masks to a zip file

1 Like

Yep, looked that this, thanks.