mirror of
https://github.com/Intervention/image.git
synced 2025-08-30 09:10:21 +02:00
readme update
This commit is contained in:
@@ -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');
|
||||
|
||||
|
@@ -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()
|
||||
|
Reference in New Issue
Block a user