moroz1999 / sxg
SXG conversion/generation in PHP
Installs: 45
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 4
Forks: 0
Open Issues: 0
Type:package
Requires
- php: >=5.6.0
- ext-gd: *
README
This repository contains the tools required for SXG images generation in PHP.
Usage example
$gd = imagecreatefromjpeg('boobs.jpg'); include_once('src/Sxg/Image.php'); $image = new Sxg\Image(); $image->setWidth(320); $image->setHeight(240); $array = [ 0x000fff, 0xff00ff, 0x000000, 0xff0000, 0xffff00, 0xffffff, 0xf0ff30, 0x808080, 0x80f080, 0xcdcdcd, 0xf7cdb4, 0x432118, 0xb58169, ]; $image->setColorFormat($image::SXG_COLOR_FORMAT_16); $image->setRgbPalette($array); $image->setPaletteType($image::SXG_PALETTE_FORMAT_CLUT); $image->importFromGd($gd); file_put_contents('test.sxg', $image->getSxgData());
Installation
Composer
{ "require": { "moroz1999/sxg": "*" } }
Links
- "SXG Format description" - in Russian
- "Video modes and architecture of TS-Config on ZX Evolution" - in Russian
License
Creative Commons Zero v1.0 Universal