This class provides functions to read structured FAX files (SFF) and convert them into PNG file(s).
- PHP 7.3 or higher
- Composer (follow the installation guide at https://getcomposer.org/download/)
You can install it through Composer:
"require": {
"blacksenator/sff2png": "^1.0"
},
or
git clone https://github.com/blacksenator/sff2png.git
<?PHP
require_once 'sffImager.php';
use blacksenator\sff\sffImager;
$rawData = file_get_contents('Test_2.sff');
$sFFile = new sffImager($rawData);
$images = $sFFile->getSFFasPNG($rawData);
foreach ($images as $number => $image) {
file_put_contents('FAX_page_' . ($number + 1) . '.png', $image);
}
This script is released under MIT license.
Copyright (c) 2022 Volker Püschel