https://github.com/depp/unrez
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/depp/unrez
- Owner: depp
- License: mit
- Created: 2017-05-27T16:28:38.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-02T02:09:05.000Z (about 9 years ago)
- Last Synced: 2025-01-27T11:46:13.011Z (over 1 year ago)
- Language: C
- Size: 102 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# UnRez
UnRez extracts data from Macintosh resource forks and converts it to modern formats. UnRez UnRez also converts QuickDraw PICT files to PNG.
UnRez does not need to run on a Macintosh. It can extract resources from MacBinary or AppleDouble files transparently.
## Examples
To extract PICT resources from a file, use the `pict2png` tool with `-all-picts`:
$ ls
my_file.bin
$ unrez pict2png my_file.bin -dir out -all-picts
Writing my_file.bin.128.png...
Writing my_file.bin.129.png...
Writing my_file.bin.130.png...
$ ls out
my_file.bin.128.png
my_file.bin.129.png
my_file.bin.130.png
## Building
You need Python 3, Ninja, LibPNG, and pkg-config. Once you have these all installed, configure and install:
$ ./gen.py
$ ninja
This should create the `unrez` executable, and `libunrez.a`. Documentation for the library is available in its header file.
## Limitations
Only a subset of QuickDraw pictures are supported. This is because QuickDraw pictures can be very complex. Internally, they consist of a series of opcodes for drawing commands. You could create a picture in code by recording drawing commands and having QuickDraw play them back later.
Almost none of that is supported. Unrez looks for an opcode with a bitmap, and extracts the bitmap. UnRez has been tested with 1-bit, 8-bit, 16-bit, and 32-bit images.