Skip to content

1.0.0

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 05 Oct 16:07
47585e6
<?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 📦

Dependencies 📦,Feature 🏗

Dependencies 📦,Enhancement ✨

Feature 🏗

Enhancement ✨