blacksenator/sff2png

Converting structured FAX file into one or more PNG

v1.0 2022-09-19 08:02 UTC

This package is auto-updated.

Last update: 2024-04-20 12:07:28 UTC


README

Purpose

This class provides functions to read structured FAX files (SFF) and convert them into PNG file(s).

Requirements

Installation

You can install it through Composer:

"require": {
    "blacksenator/sff2png": "^1.0"
},

or

git clone https://github.com/blacksenator/sff2png.git

Usage

<?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);
}

License

This script is released under MIT license.

Author

Copyright (c) 2022 Volker Püschel