Skip to content

Commit

Permalink
Prepend a newline to prevent things from messing up
Browse files Browse the repository at this point in the history
  • Loading branch information
mieky committed Jun 8, 2012
1 parent 61ddd88 commit d7fedb3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions skypper.js
@@ -1,7 +1,7 @@
/* skypper -- convert images into skype emoticons */

(function() {
var colorMap = {
var colorMap = {
"000000": "(emo)",
"ffffff": "(e)",
"ff0000": "(devil)",
Expand All @@ -20,7 +20,7 @@
// Create & append a canvas with its size matching the image
canvas = document.getElementById('canvas');
canvas.width = img.width;
canvas.height = img.height;
canvas.height = img.height;

// Insert image contents into the canvas and call callback with image data
var ctx = canvas.getContext("2d");
Expand Down Expand Up @@ -99,7 +99,7 @@

withImageData(imageSrc, function(imageData) {
var rows = mapToValues(imageData),
result = '';
result = "\n";

// Create an output string of the rows and columns
for (var row = 0; row < rows.length; row++) {
Expand All @@ -110,6 +110,6 @@
}

document.getElementById('output').value = result;
});
});
}();
}());

0 comments on commit d7fedb3

Please sign in to comment.