Skip to content

0x09/jbfinspect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Parser and documentation for "pspbrwse.jbf" thumbnail caches generated by the file browsing component of Jasc Paint Shop Pro and Animation Shop.
The formats have been fully reverse engineered by studying program output without the use of a decompiler.
The format is described in the source file, and mirrored in the binary.

Scripts exist like this one which can dump v2 files by scraping for JPEG headers, but as of 2011 I wasn't able to find any full reverse engineering of the format.
Code is a simple step-by-step parser which should be easy to reference for adding JBF support in file forensics programs or etc.

Works on all major platforms with a C99 compiler. There is no makefile, simply make jbfinspect.

Thumbnail formats

V2 files (PSP 6+) simply contain embedded JFIF thumbs. Older formats use two different custom bitmap RLE schemes with a custom implicit palette. For these the tool will decode the RLCs and write a plain bitmap with the palette added.
The first format (PSP 3-4) consists of either a run-length prefix followed by a palette index to repeat, or a raw palette entry for values < 192.
The second (PSP 5) consists of a run-length prefix followed by color, or a length prefix signalling a series of raw palette entries will follow for values < 128.
The parsing logic is thus:

v1.0-1.1: byte > 0xC0 ? [runlength+0xC0],[color] : [color]
v1.3:     byte > 0x80 ? [runlength+0x80],[color] : [length],[colors]...

Use

The command line tool can list metadata from the file or dump its contents with a few options including the ability to highlight or dump only thumbnails which no longer exist in the JBF source folder, and the ability to dump thumbs into a path recreated from the original path listed inside the JBF.

Examples

List jbf contents, highlighting orphaned thumbnails (ANSI colors)

jbfinspect -o pspbrwse.jbf

Dump missing thumbs from a jbf into "thumbs"

jbfinspect -qod thumbs pspbrwse.jbf

Dump every jbf in home into a reconstructed directory tree under "thumbs"

find ~/ -name "*.jbf" -exec jbfinspect -qrd thumbs {} \;

About

Parser for Jasc Browser Files generated by Paint Shop Pro et al.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages