homelan / acorn-mode7
Provides a class for build png/jpeg/gif images of raw mode 7 graphics data from the BBC Mirco (teletext, and viewdata)
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 0
Type:project
Requires
- php: >=7.1
- homelan/core-filesystem: ^1.0
Requires (Dev)
- phpunit/phpunit: 6.*
This package is auto-updated.
Last update: 2025-05-20 12:17:33 UTC
README
PHP Class for reading Viewdata, Teletext, BBC Mode 7 Graphics, and producing jpeg, png, gif images from that data.
Install
composer require homelan/acorn-mode7
Usage
There is one class Mode7, and loads raw BBC mode 7 (teletext) graphics data and produces jpeg/png/gif images from it.
The constructor requires passing a filesystem object to it.
use HomeLan\Retro\Acorn\BBC\Gfx\Mode7;
use HomeLan\Core\Filesystem\Filesystem;
$oTeleText = new Mode7(
new Filesystem()
);
Once the oject exists it can load any raw mode7 graphics data
$oTeleText->loadMode7Data('/tmp/download.txt');
It can then produce an image file of that data in different formats
$oTeleText->writePng('/tmp/0-0.png');
$oTeleText->writeJpeg('/tmp/0-0.jpg');
$oTeleText->writeGif('/tmp/0-0.gif');
$oTeleText->writeBmp('/tmp/0-0.bmp');