From 2439af4b55dd5b62fc9c3e0f9786dcea4cd82f47 Mon Sep 17 00:00:00 2001 From: mweimerskirch <362092+mweimerskirch@users.noreply.github.com> Date: Fri, 22 Jun 2018 18:01:06 +0200 Subject: [PATCH] Fixed examples --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8c3ff75..55326b1 100644 --- a/README.md +++ b/README.md @@ -28,10 +28,11 @@ through `league/flysystem`, which is explicitly set as dependency. ### Sixty-second start ```php +use \AmaTeam\Image\Projection\API\Image\Format; use \AmaTeam\Image\Projection\Framework; use \AmaTeam\Image\Projection\Framework\EncodingOptions; +use \AmaTeam\Image\Projection\Geometry\Box; use \AmaTeam\Image\Projection\Specification; -use \AmaTeam\Image\Projection\Image\Format; $framework = new Framework(); $source = new Specification('equirect', 'tmp/uploads/source.jpg'); @@ -69,12 +70,12 @@ done using `#convertAll()`, which uses single reader: $targets = array_map(function ($index) { $side = 256 * (int) pow($index, 2); $tileSide = min($side, 512); - $size = $side / $side; + $size = $index; $tileSize = new Box($tileSide, $tileSide); $layout = new Box($size, $size); $path = sprintf('static/pano/%d/{f}/{x}/{y}.jpg', $index); return new Specification('cube', $path, $tileSize, $layout); -}, range(0, 3)); +}, range(1, 3)); $framework->convertAll($source, $targets); ```