<?php
declare(strict_types=1);
use Intervention\Image\Drivers\Gd\Driver;
use Intervention\Image\ImageManager;
use WyriHaximus\TileStitcher\Coordinate;
use WyriHaximus\TileStitcher\Dimensions;
use WyriHaximus\TileStitcher\FileLoader;
use WyriHaximus\TileStitcher\Stitcher;
use WyriHaximus\TileStitcher\Tile;
$tiles = [
new Tile(
new Coordinate(69, 69),
new FileLoader('map/69_69.png'),
),
new Tile(
new Coordinate(70, 69),
new FileLoader('map/70_69.png'),
),
];
$stitcher = new Stitcher(
new ImageManager(
new Driver(),
),
);
$image = $stitcher->stitch(
'image/png',
Map::calculate(
new Dimensions(512, 512),
...$tiles,
),
);
file_put_contents('output/two_tile.png', $image);
1.0.0
- Total issues resolved: 0
- Total pull requests resolved: 11
- Total contributors: 2
Bug 🐞,Dependencies 📦
- 13: Get Psalm to stop bitching about features that aren't supported by all PHP versions in range thanks to @WyriHaximus
Dependencies 📦,Feature 🏗
Dependencies 📦,Enhancement ✨
- 7: Simplify Map bounds calculation thanks to @WyriHaximus
- 5: Use intervention/image for image operations thanks to @WyriHaximus
Feature 🏗
- 14: Introduce tile locator thanks to @WyriHaximus
- 8: Switch to returning generate image as string thanks to @WyriHaximus
- 1: Initial version thanks to @WyriHaximus
Enhancement ✨
- 12: Require at least one tile thanks to @WyriHaximus
- 11: Automatically resize tiles to the desired tile size thanks to @WyriHaximus
- 6: [ImgBot] Optimize images thanks to @imgbot[bot]
- 4: [ImgBot] Optimize images thanks to @imgbot[bot]