Changes

Teletext

1,004 bytes added, 16:49, 7 March 2020
===Repo pour les pages FIXME===
* https://git.fixme.ch/FIXME/teletext
 
===Code for image conversion===
 
Done by Nico D. in Perl.
 
Image must first be processed in Gimp to resize it to 80 pixel width, colour converted to 1 bit black&white, floyd-steinberg.
 
#!/usr/bin/perl
use GD;
open(F,">/tmp/test3.tti");
open (IM,"mc80.png") || die;
$im = newFromPng GD::Image('IM');
close IM;
print F "DE,Read back page40600
PN,40600
CT,15
SC,0001
PS,8040
MS,40600
";
$xbase = 0;
$ybase = 0;
$y = $ybase;
for($i=0;$i<25;$i++) {
print F "OL,$i,".chr(0x1b).chr(0x57);
$x = $xbase;
for($c=0; $c<40; $c++) {
$t =
$im->getPixel($x, $y) + ($im->getPixel($x + 1, $y ) << 1) +
($im->getPixel($x, $y + 1) << 2 ) + ($im->getPixel($x + 1, $y + 1) << 3) +
($im->getPixel($x, $y + 2) << 4 ) + ($im->getPixel($x + 1, $y + 2) << 5);
$t^=63;
$t+=32;
if($t>=64) { $t+=32; }
print F chr($t);
$x += 2;
}
$y += 3;
print F "\n";
}
print F "FL,407,408,410,405,00F,400";
105
edits