tti.js
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -1,2 +0,1 @@ | ||
require('colors'); | ||
const fs = require('fs'); | ||
@@ -61,3 +60,3 @@ const _ = require('lodash'); | ||
*/ | ||
const image = new Jimp(width, height, '#000000ff'); | ||
const image = new Jimp(width, height, '#00000000'); | ||
matrix.forEach((row, y) => { | ||
@@ -85,3 +84,3 @@ row.forEach((pixel, x) => { | ||
for (const { x, y } of image.scanIterator(0, 0, image.bitmap.width, image.bitmap.height)) { | ||
let color = await image.getPixelColor(x, y).toString(16).substring(0, 6); | ||
let color = image.getPixelColor(x, y).toString(16).substring(0, 6); | ||
let bytes = [ | ||
@@ -97,3 +96,3 @@ color.slice(0, 2), | ||
if (!cl.flags.hex) { | ||
symbols = symbols.filter(e => e != '00').map(byte => String.fromCharCode(parseInt(byte, 16))); | ||
symbols = symbols.filter(e => parseInt(e)).map(byte => String.fromCharCode(parseInt(byte, 16))); | ||
console.log('✔️ Converted to text'); | ||
@@ -100,0 +99,0 @@ } |
{ | ||
"name": "tti.js", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Text to image conversion utility.", | ||
@@ -12,3 +12,2 @@ "main": "./lib/tti.js", | ||
"dependencies": { | ||
"colors": "^1.4.0", | ||
"jimp": "^0.16.1", | ||
@@ -15,0 +14,0 @@ "lodash": "^4.17.21" |
2
9185
257
- Removedcolors@^1.4.0
- Removedcolors@1.4.0(transitive)