
Product
Introducing Supply Chain Attack Campaigns Tracking in the Socket Dashboard
Campaign-level threat intelligence in Socket now shows when active supply chain attacks affect your repositories and packages.
img2teletext
Advanced tools
TypeScript CLI and library for converting PNG/JPEG images to teletext graphics with multiple output formats
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.

It handles images of any dimensions, they don't have to be within the constraints of a standard teletext page.
This module is distributed via npm.
$ npm install -g img2teletext
$ img2teletext <image-file> [options]
-V, --version - Output the version number-b, --bin - Generate binary output (default)-e, --edittf - Generate edit.tf URL for online teletext editor-z, --zxnet - Generate ZXNet URL for online teletext editor--base64 - Generate base64 encoded output-j, --json - Generate JSON array output--hash - Generate teletext hash for edit.tf and zxnet compatibility-h, --help - Display help information# Convert image to binary teletext data (default output)
$ img2teletext image.png
# Generate a JSON array of teletext character codes
$ img2teletext image.png --json
# Generate a shareable edit.tf URL
$ img2teletext image.png --edittf
# Generate a shareable ZXNet URL
$ img2teletext image.png --zxnet
# Generate base64 encoded data
$ img2teletext image.png --base64
# Generate teletext hash for compatibility
$ img2teletext image.png --hash
.png).jpg, .jpeg)const img2teletext = require('img2teletext').default;
const { PNG } = require('pngjs');
const fs = require('fs');
const data = fs.readFileSync('./test/test.png');
const png = PNG.sync.read(data);
const teletextData = img2teletext(png.data, png.width);
console.log(teletextData);
import img2teletext from 'img2teletext';
import { PNG } from 'pngjs';
import fs from 'fs';
const data = fs.readFileSync('./test/test.png');
const png = PNG.sync.read(data);
const teletextData: Uint8Array = img2teletext(png.data, png.width);
console.log(teletextData);
This project is written in TypeScript. To build the project:
npm install
npm run build
To run tests:
npm test
To watch for changes during development:
npm run dev
This code is released under the MIT license, feel free to do whatever you want with it.
FAQs
TypeScript CLI and library for converting PNG/JPEG images to teletext graphics with multiple output formats
We found that img2teletext demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Product
Campaign-level threat intelligence in Socket now shows when active supply chain attacks affect your repositories and packages.

Research
Malicious PyPI package sympy-dev targets SymPy users, a Python symbolic math library with 85 million monthly downloads.

Security News
Node.js 25.4.0 makes require(esm) stable, formalizing CommonJS and ESM compatibility across supported Node versions.