Skip to content

Instantly share code, notes, and snippets.

@bwinton
Last active October 17, 2015 14:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bwinton/1d5f615daae5e799b389 to your computer and use it in GitHub Desktop.
Save bwinton/1d5f615daae5e799b389 to your computer and use it in GitHub Desktop.
An Acorn Plugin to save files as PXON.
/*
How to install this plugin:
1) Choose Acorn's Help ▸ Open Acorn's App Support Folder menu item.
2) Place this script in the Plug-Ins folder (and make sure it ends with .jstalk)
3) Restart Acorn. The plugin will now show up in the Filter menu.
ACScriptMenuTitle=Convert to PXON
ACShortcutKey=p
ACShortcutMaskKey=command control
ACIsActionKey=true
*/
function append(data, string) {
data.appendData(string.dataUsingEncoding(NSUTF8StringEncoding));
}
function isoDate(date) {
dateFormatter = NSDateFormatter.alloc().init();
dateFormatter.setLocale(NSLocale.localeWithLocaleIdentifier('en_US_POSIX'));
dateFormatter.setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
return dateFormatter.stringFromDate(date);
}
function getYear(date) {
dateFormatter = NSDateFormatter.alloc().init();
dateFormatter.setLocale(NSLocale.localeWithLocaleIdentifier('en_US_POSIX'));
dateFormatter.setDateFormat('yyyy');
return dateFormatter.stringFromDate(date);
}
function main(image, doc, layer) {
var savePanel = NSSavePanel.savePanel();
savePanel.setExtensionHidden(false);
savePanel.setAllowedFileTypes(['pxon']);
savePanel.setNameFieldStringValue(doc.displayName().stringByAppendingPathExtension('pxon'));
if (savePanel.runModal()) {
var cgimg = doc.CIImage();
var data = NSMutableData.data();
var bitmap = NSBitmapImageRep.alloc().initWithCIImage(cgimg);
var props = doc.exifPropertiesForSaving()['{PNG}'];
var software = props['Software'];
var artist = props['Author'] || NSFullUserName();
var title = props['Title'] || savePanel.nameFieldStringValue().stringByDeletingPathExtension();
var description = props['Description'];
var year = getYear(doc.fileModificationDate() || NSDate.date());
var copyright = props['Copyright'] || NSString.stringWithFormat(@'%@ %@', artist, year);
var date = isoDate(doc.fileModificationDate() || NSDate.date());
append(data, @'{\n');
append(data, @' "exif": {\n');
append(data, NSString.stringWithFormat(@' "software": "%@",\n', software));
append(data, NSString.stringWithFormat(@' "artist": "%@",\n', artist));
append(data, NSString.stringWithFormat(@' "imageDescription": "%@",\n', title));
if (description) {
append(data, NSString.stringWithFormat(@' "userComment": "%@",\n', description));
}
if (copyright) {
append(data, NSString.stringWithFormat(@' "copyright": "%@",\n', copyright));
}
append(data, NSString.stringWithFormat(@' "dateTime": "%@"\n', date));
append(data, @' },\n');
append(data, @' "pxif": {\n');
append(data, @' "pixels": [\n');
var size = doc.canvasSize();
for (x = 0; x < size.width; x++) {
for (y = 0; y < size.height; y++) {
var pixel = [bitmap colorAtX:x y:y];
append(data, @' {\n');
append(data, NSString.stringWithFormat(@' "xPos": %@,\n', x));
append(data, NSString.stringWithFormat(@' "yPos": %@,\n', y));
append(data, NSString.stringWithFormat(@' "color": "rgba(%@, %@, %@, %@)",\n',
pixel.redComponent(), pixel.greenComponent(), pixel.blueComponent(), pixel.alphaComponent()
));
append(data, @' "size": 1\n');
append(data, @' },\n');
}
}
append(data, @' ],\n');
append(data, @' "dataURL" : "data:image/png;base64,');
data.appendData(doc.dataOfType("public.png").base64EncodedDataWithOptions(nil));
append(data, @'"\n');
append(data, @' }\n');
append(data, @'}\n');
data.writeToURL_atomically(savePanel.URL(), true);
}
}
{
"exif": {
"software": "Flying Meat Acorn 5.1",
"artist": "Blake Winton",
"imageDescription": "My Test Image",
"userComment": "Just a test image to use.",
"copyright": "Blake Winton - 2015",
"dateTime": "2015-10-12T17:00:43.000Z"
},
"pxif": {
"pixels": [
{
"xPos": 0,
"yPos": 0,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 0,
"yPos": 1,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 0,
"yPos": 2,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 0,
"yPos": 3,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 0,
"yPos": 4,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 0,
"yPos": 5,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 0,
"yPos": 6,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 0,
"yPos": 7,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 0,
"yPos": 8,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 0,
"yPos": 9,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 0,
"yPos": 10,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 0,
"yPos": 11,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 0,
"yPos": 12,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 0,
"yPos": 13,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 0,
"yPos": 14,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 1,
"yPos": 0,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 1,
"yPos": 1,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 1,
"yPos": 2,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 1,
"yPos": 3,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 1,
"yPos": 4,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 1,
"yPos": 5,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 1,
"yPos": 6,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 1,
"yPos": 7,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 1,
"yPos": 8,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 1,
"yPos": 9,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 1,
"yPos": 10,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 1,
"yPos": 11,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 1,
"yPos": 12,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 1,
"yPos": 13,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 1,
"yPos": 14,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 2,
"yPos": 0,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 2,
"yPos": 1,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 2,
"yPos": 2,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 2,
"yPos": 3,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 2,
"yPos": 4,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 2,
"yPos": 5,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 2,
"yPos": 6,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 2,
"yPos": 7,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 2,
"yPos": 8,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 2,
"yPos": 9,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 2,
"yPos": 10,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 2,
"yPos": 11,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 2,
"yPos": 12,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 2,
"yPos": 13,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 2,
"yPos": 14,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 3,
"yPos": 0,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 3,
"yPos": 1,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 3,
"yPos": 2,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 3,
"yPos": 3,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 3,
"yPos": 4,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 3,
"yPos": 5,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 3,
"yPos": 6,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 3,
"yPos": 7,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 3,
"yPos": 8,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 3,
"yPos": 9,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 3,
"yPos": 10,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 3,
"yPos": 11,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 3,
"yPos": 12,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 3,
"yPos": 13,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 3,
"yPos": 14,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 4,
"yPos": 0,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 4,
"yPos": 1,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 4,
"yPos": 2,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 4,
"yPos": 3,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 4,
"yPos": 4,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 4,
"yPos": 5,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 4,
"yPos": 6,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 4,
"yPos": 7,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 4,
"yPos": 8,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 4,
"yPos": 9,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 4,
"yPos": 10,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 4,
"yPos": 11,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 4,
"yPos": 12,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 4,
"yPos": 13,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 4,
"yPos": 14,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 5,
"yPos": 0,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 5,
"yPos": 1,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 5,
"yPos": 2,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 5,
"yPos": 3,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 5,
"yPos": 4,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 5,
"yPos": 5,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 5,
"yPos": 6,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 5,
"yPos": 7,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 5,
"yPos": 8,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 5,
"yPos": 9,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 5,
"yPos": 10,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 5,
"yPos": 11,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 5,
"yPos": 12,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 5,
"yPos": 13,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 5,
"yPos": 14,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 6,
"yPos": 0,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 6,
"yPos": 1,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 6,
"yPos": 2,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 6,
"yPos": 3,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 6,
"yPos": 4,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 6,
"yPos": 5,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 6,
"yPos": 6,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 6,
"yPos": 7,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 6,
"yPos": 8,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 6,
"yPos": 9,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 6,
"yPos": 10,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 6,
"yPos": 11,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 6,
"yPos": 12,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 6,
"yPos": 13,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 6,
"yPos": 14,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 7,
"yPos": 0,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 7,
"yPos": 1,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 7,
"yPos": 2,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 7,
"yPos": 3,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 7,
"yPos": 4,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 7,
"yPos": 5,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 7,
"yPos": 6,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 7,
"yPos": 7,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 7,
"yPos": 8,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 7,
"yPos": 9,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 7,
"yPos": 10,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 7,
"yPos": 11,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 7,
"yPos": 12,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 7,
"yPos": 13,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 7,
"yPos": 14,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 8,
"yPos": 0,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 8,
"yPos": 1,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 8,
"yPos": 2,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 8,
"yPos": 3,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 8,
"yPos": 4,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 8,
"yPos": 5,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 8,
"yPos": 6,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 8,
"yPos": 7,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 8,
"yPos": 8,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 8,
"yPos": 9,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 8,
"yPos": 10,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 8,
"yPos": 11,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 8,
"yPos": 12,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 8,
"yPos": 13,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 8,
"yPos": 14,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 9,
"yPos": 0,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 9,
"yPos": 1,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 9,
"yPos": 2,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 9,
"yPos": 3,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 9,
"yPos": 4,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 9,
"yPos": 5,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 9,
"yPos": 6,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 9,
"yPos": 7,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 9,
"yPos": 8,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 9,
"yPos": 9,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 9,
"yPos": 10,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 9,
"yPos": 11,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 9,
"yPos": 12,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
{
"xPos": 9,
"yPos": 13,
"color": "rgba(0.4941176470588236, 0.3294117647058823, 0.5176470588235295, 1)",
"size": 1
},
{
"xPos": 9,
"yPos": 14,
"color": "rgba(0.625, 0.1625, 0.7875000000000001, 0.3137254901960784)",
"size": 1
},
],
"dataURL" : "data:image/png;base64,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"
}
}
@bwinton
Copy link
Author

bwinton commented Oct 12, 2015

See here and here for more details. 😄

@jennschiffer
Copy link

hey pal, this is so great! i updated my draft jennmoney.biz/pxon that updates xPos to x and yPos to y – trying to leave a smaller footprint for hardware connection purposes. 🎅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment