Update README and add screenshot
This commit is contained in:
parent
1c52fc0e8e
commit
36820529b7
2 changed files with 32 additions and 13 deletions
45
README.md
45
README.md
|
@ -1,26 +1,45 @@
|
|||
# Procreate Viewer
|
||||
I use my computer to store all of my backups of my [Procreate](https://procreate.art) documents (since they seem reluctant to add actual cloud saving), but
|
||||
I can never figure out which documents are which, so I created this app to alleviate this dilemma. This app is written in Swift and supports the new QuickLook generator API.
|
||||
This is a macOS app to view [Procreate](https://procreate.art) documents, and it also contains [QuickLook](https://support.apple.com/guide/mac-help/preview-files-with-quick-look-mh14119/mac) and thumbnail extensions to allow you to
|
||||
quickly preview your files as well!
|
||||
|
||||
This project includes a viewer app that can render your Procreate documents at full resolution. It also contains a Quick Look preview and thumbnail generators as well. Please note that since there is almost no documentation on how
|
||||
these new generator api's work, they might be broken. Once you install the app, all `.procreate` documents will automatically open with it.
|
||||

|
||||
|
||||
I created this app because I frequently store backups of my Procreate documents on my computer, but you can't actually preview them! And if you're like, the files have nonsense or unusable names like "Untitled" or "Untitled 1", making file management harder.
|
||||
|
||||
## Usage
|
||||
Installing this app is simple, just open it at least once to register the QuickLook and thumbnail extensions to Finder. Although it's still experimental, you can view Procreate files in-app. Because blending modes are unsupported, only simpler canvases render correctly.
|
||||
|
||||
For user's interested, this app registers the `com.procreate` [UTI](https://developer.apple.com/documentation/uniformtypeidentifiers) into your system. This is registered for all `.procreate` files (they are detected via file extension).
|
||||
|
||||
## Dependencies
|
||||
We use the Swift Package Manager to handle our only Swift dependency, [ZipFoundation](https://github.com/weichsel/ZIPFoundation).
|
||||
Swift Package Manager is used to handle our only Swift dependency, [ZipFoundation](https://github.com/weichsel/ZIPFoundation). This is automatically fetched when you open the project in XCode.
|
||||
|
||||
[MiniLZO](http://www.oberhumer.com/opensource/lzo/) is used to decode image data but has already been included in the repository and is built with the project.
|
||||
[MiniLZO](http://www.oberhumer.com/opensource/lzo/) is used to decode image data but has already been included in the repository for convenience.
|
||||
|
||||
## Procreate File Format
|
||||
All `.procreate` files are actually standard ZIP files. So extracting them leads to something like this:
|
||||
## Reverse Engineering Notes
|
||||
When looking at `.procreate` files, it's important to note that they are actually standard ZIP files. If you want to take a
|
||||
quick look at the file contents, simply extract them. Here's a sample directory listing:
|
||||
```
|
||||
- (Layer folders named by their UUID)
|
||||
- Contains .chunk files, presumably the actual pixel canvas data for the document.
|
||||
- QuickLook [Folder]
|
||||
- Contains .chunk files, the raster canvas data for the document.
|
||||
- QuickLook
|
||||
- Thumbnail.png - Low-quality screenshot generated by Procreate.
|
||||
- video [Folder]
|
||||
- segments [Folder]
|
||||
- video
|
||||
- segments
|
||||
- segment-X.mp4, where X is a number starting from 1.
|
||||
- Document.archive - NSKeyedArchive containing layer information along with other document information like canvas size.
|
||||
```
|
||||
|
||||
In order to parse Document.archive, first decode the binary plist format. Then you'll want to access the `$top` object to access the index of the `SilicaDocument` object in the `$objects` array. This is where most of your document information belongs. If you want more information please read [#2](https://github.com/redstrate/procreate-viewer/issues/2) where I break down the format of this file in more detail. Please also check out [jarmovogel's Procreate Viewer](https://github.com/jaromvogel/ProcreateViewer) which helped me understand how to read the actual image data in a Procreate document.
|
||||
### Raster Canvas Data
|
||||
Reading back the actual raster information is extremely easy, most of this work as already been pioneered by [jarmovogel's Procreate Viewer](https://github.com/jaromvogel/ProcreateViewer) and simply adapted to Swift. In short, each of the `.chunk` files is compressed via [LZO](https://en.wikipedia.org/wiki/Lempel–Ziv–Oberhumer). When uncompressed, it is just raw rgba data.
|
||||
|
||||
### Thumbnails
|
||||
When the document is modified in Procreate, they generate a PNG thumbnail automatically. This is located in the `QuickLook/Thumbnail.png`. This is used by Procreate's own thumbnail extension on iOS/iPadOS. Een though it's a thumbnail image, is actually pretty decent quality. This is also used by this app's QuickLook and Thumbnail extensions.
|
||||
|
||||
### Timelapse Video
|
||||
Procreate, just like with thumbnails and image data - continue to use nice and simple formats for storing data. This is no exception for timelapse video, which is simply a series of mp4's starting at `segment-1.mp4`. As far as I know, you can't glean the number of segments required for a full video ahead of time, so you must resort to listing the segments in the `video/segments` folder beforehand.
|
||||
|
||||
### Document Data
|
||||
Layer names, time spent and other data is located in `Document.archive`. This is the only hard to read file in Procreate documents, but it is a [NSKeyedArchive](https://developer.apple.com/documentation/foundation/nskeyedarchiver). In this app, we just use the [PropertyListSerialization](https://developer.apple.com/documentation/foundation/propertylistserialization) object to decode this in Swift.
|
||||
|
||||
If you want more information please read [#2](https://github.com/redstrate/procreate-viewer/issues/2) where I break down the format of this file in more detail.
|
||||
|
|
BIN
misc/screenshot.png
Normal file
BIN
misc/screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 369 KiB |
Reference in a new issue