Go to file
Justin Bass 233216dc92 Bug-fixes to add and fix tests. Decoding greatly improved.
Fix resize tests by increasing data bounds threshold.

Easier modify image expression

Clean and fix block sizes, colored rows test working

Fix pages by being flexible to missing sectors

Use exponential drop-off within dots to find pixel values.

Try different right and bottom bounds to improve decoding.
2018-11-11 18:42:51 -08:00
colorsafe Bug-fixes to add and fix tests. Decoding greatly improved. 2018-11-11 18:42:51 -08:00
docs Bug-fixes to add and fix tests. Decoding greatly improved. 2018-11-11 18:42:51 -08:00
images Working decoding for scanned colordepth 1 images, slightly messy. 2017-12-01 21:55:08 -08:00
test Bug-fixes to add and fix tests. Decoding greatly improved. 2018-11-11 18:42:51 -08:00
.gitignore End to end tests, configurable output directory, fix bounds 2018-05-14 00:58:27 -07:00
LICENSE Initial commit 2017-11-12 17:56:52 -08:00
README.md Bug-fixes to add and fix tests. Decoding greatly improved. 2018-11-11 18:42:51 -08:00
setup.cfg Pypi initial config 2017-11-12 21:09:09 -08:00
setup.py Add constants, exceptions, and utils files 2018-10-21 21:49:15 -07:00

README.md

ColorSafe

A data matrix scheme for printing on paper and microfilm. Inspired by PaperBak, ColorSafe is written in Python and has a flexible specification. It aims to allow a few Megabytes of data (or more) to be stored on printable media for a worst case scenario backup, for extremely long-term archiving, or just for fun. With best practices, ColorSafe encoded data can safely withstand the vicissitudes of technology changes over long periods of time.

Examples

ColorSafe encoded data with default black and white settings looks like this:

Color depth 1

With a color depth of 2 (Cyan, Magenta, Yellow, White) it looks like this:

Color depth 2

With a color depth of 3 (Black, Red, Green, Yellow, Blue, Magenta, Cyan, White) it looks like this:

Color depth 3

Check out the images folder to see sample images of full pages.

Usage

To install:

pip install colorsafe

To encode a file with default settings, e.g. 100dpi:

colorsafe encode input.txt

This generates a single pdf and multiple png files with the black and white data matrices, which can then be printed and stored.

To decode, scan the images back at 3x resolution, e.g. 300dpi, and run decoding:

colorsafe decode scan_page0.bmp scan_page1.bmp

Which outputs the data on the given pages.

Try the argument -c 2 or 3 for colorized encoding and decoding modes.