What is this?
A python script to pull out PICT data from files with Mac Resource forks
Why?
There's nothing else like this out there that I can find.
How?
https://en.wikipedia.org/wiki/Resource_fork explains the concept of a Resource Fork. One of the items in the Resource Fork is a PICT resource. This is litterally a PICT file minus the 512 byte header. The PICT file is really poorly documented but that's not actually important for getting it out. The basic steps here are
- Run DeRez on the file to extract the PICT data
- Parse the PICT data
- add a 512 byte header of zeros, stick it in a binary file with .pct
- Open with Preview
- Save your image to a more modern format
What do I need?
- Python
- Apple Developer tools with DeRez
How to use?
python
Isn't this kind of a hackjob?
You betcha. The hope is that this will be useful to someone else who is poking at ancient mac files.