Socket
Book a DemoInstallSign in
Socket

png2teletext

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

png2teletext

PNG to Teletext graphics converter

latest
Source
npmnpm
Version
3.0.4
Version published
Maintainers
1
Created
Source

png2teletext

This is a CLI application for converting images to teletext level 1 compatible data. Starting from the upper leftmost, the algorithm goes by 2x3 blocks of pixels, and translates them to teletext mosaic charachters. It can also be used as a Node.js library.

poes

It handles images of any dimensions, they don't have to be within the constraints of a standard teletext page.

Requirements

  • node v8 or older (It probably works with older versions as well, but I haven't tested it on anything older than v8.9.0.)
  • npm v5 or older (It comes with node.)

Installation

This module is distributed via both npm and yarn.

$ npm install png2teletext --g

Command line example

$ png2teletext ./test/test.png --out teletextData.bin

Using it as a Node.js library

const png2teletext = require('png2teletext');
const { PNG } = require('pngjs');
const fs = require('fs');

const data = fs.readFileSync('./test/test.png');
const png = PNG.sync.read(data);
const teletextData = png2teletext(png.data, png.width);

console.log(teletextData);

This code is released under the MIT license, feel free to do whatever you want with it.

Keywords

teletext

FAQs

Package last updated on 23 Oct 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts