Skip to content
Sprite extractor for PICO-8 cartridges
Python
Branch: master
Clone or download

Latest commit

Latest commit 0785081 Aug 24, 2015

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitattributes 👾 Added .gitattributes Aug 24, 2015
.gitignore First Commit Aug 24, 2015
README.md Added download link Aug 24, 2015
gfxexport.py Renamed gfxexport-8.py into gfxexport.py Aug 24, 2015
png.py First Commit Aug 24, 2015

README.md

GFXExport-8

This is a simple command line script that extracts the sprite data from a PICO-8 cartridge into a png file.

Note that at the moment, the reverse operation (importing graphics from a png into a .p8) is not supported. Check out Terry Cavanagh's compiler which is able to do that. I might add this feature in the near future if there is need for it.

This scripts uses and redistributes PyPNG (https://github.com/drj11/pypng), licensed under the MIT license (see png.py for details)

Installation

This script should support Windows, Linux and Mac (not tested)

You will need Python (any recent version, 2 or 3, should be fine). It is preinstalled under Mac and Linux. For Windows, download it on python.org.

Simply download the archive or clone the repo, and extract gfxextract.py AND png.py into a folder easily accessible by command line.

Usage

This script supports only .p8 cartridges, not .p8.png !!

In a command line prompt, run python gfxexport-8.py <cart name>. The sprites will be extracted in output.png.

Do not put the whole path to the catridge, the default for your system is automatically used. If you need to change it, use the -d flag (see below). Adding .p8 after the catridge name is not needed as it will be appended automatically.

With command line flags, you can upscale the output image, change the output filename and change the cartridge directory

  -d DIRECTORY, --directory DIRECTORY
                        pico-8 carts directory (default:
                        system dependant)
  -o OUTPUT, --output OUTPUT
                        Output filename (default: output.png)
  -u UPSCALE, --upscale UPSCALE
                        Upscale factor (e.g 2=2*2 pixels) (default: 1)
You can’t perform that action at this time.