1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-30 01:00:06 +02:00

readme update

This commit is contained in:
Oliver Vogel
2013-02-02 18:09:19 +01:00
parent 2e95012644
commit 27824b1256
2 changed files with 22 additions and 0 deletions

View File

@@ -85,6 +85,13 @@ $img->greyscale();
// pixelate image with blocksize of 25x25 pixel
$img->pixelate(25);
// fill image with color
$img->fill('ccc'); // its possible to use shorthand hexcolor
$img->fill('cccccc'); // or full hexcolor code
$img->fill('#ccc'); // with or without #
$img->fill('#cccccc');
$img->fill(array(204, 204, 204)); // or just pass the color as rgb format array
// save image in desired format
$img->save('public/bar.jpg');

View File

@@ -121,6 +121,15 @@ class ImageTest extends PHPUnit_Framework_Testcase
$img = $img->fill('fdf5e4');
$this->assertInstanceOf('Intervention\Image\Image', $img);
$img = $img->fill('#fdf5e4');
$this->assertInstanceOf('Intervention\Image\Image', $img);
$img = $img->fill('ccc');
$this->assertInstanceOf('Intervention\Image\Image', $img);
$img = $img->fill('#ccc');
$this->assertInstanceOf('Intervention\Image\Image', $img);
$img = $img->fill(array(155, 155, 155), rand(1,10), rand(1,10));
$this->assertInstanceOf('Intervention\Image\Image', $img);
}
@@ -140,6 +149,12 @@ class ImageTest extends PHPUnit_Framework_Testcase
$img = $this->getTestImage();
$img = $img->text('Fox', 10, 10, 16, '000000', 0, null);
$this->assertInstanceOf('Intervention\Image\Image', $img);
$img = $img->text('Fox', 10, 10, 16, '#000000', 0, null);
$this->assertInstanceOf('Intervention\Image\Image', $img);
$img = $img->text('Fox', 10, 10, 16, array(155, 155, 155), 0, null);
$this->assertInstanceOf('Intervention\Image\Image', $img);
}
public function testRectangleImage()