1
0
mirror of https://github.com/Intervention/image.git synced 2025-09-09 05:30:40 +02:00

fixed issue when converting transparent images to non-transparent formats

This commit is contained in:
Oliver Vogel
2014-05-20 21:17:34 +02:00
parent e3f13700a9
commit 6afefddb44
6 changed files with 15 additions and 13 deletions

View File

@@ -140,6 +140,9 @@ class EncoderTest extends PHPUnit_Framework_TestCase
$imagick->shouldReceive('setimagecompression')->once();
$imagick->shouldReceive('setcompressionquality');
$imagick->shouldReceive('setimagecompressionquality');
$imagick->shouldReceive('setimagebackgroundcolor');
$imagick->shouldReceive('setbackgroundcolor');
$imagick->shouldReceive('flattenimages')->andReturn($imagick);
$imagick->shouldReceive('__toString')->once()->andReturn(sprintf('mock-%s', $type));
return $imagick;
}

View File

@@ -1113,9 +1113,9 @@ class GdSystemTest extends PHPUnit_Framework_TestCase
$this->assertEquals(1, $c[3]);
$c = $img->pickColor(0, 15);
$this->assertEquals(0, $c[0]);
$this->assertEquals(0, $c[1]);
$this->assertEquals(0, $c[2]);
$this->assertEquals(255, $c[0]);
$this->assertEquals(255, $c[1]);
$this->assertEquals(255, $c[2]);
$this->assertEquals(0, $c[3]);
}
@@ -1137,9 +1137,9 @@ class GdSystemTest extends PHPUnit_Framework_TestCase
$this->assertEquals(1, $c[3]);
$c = $img->pickColor(0, 15);
$this->assertEquals(0, $c[0]);
$this->assertEquals(0, $c[1]);
$this->assertEquals(0, $c[2]);
$this->assertEquals(255, $c[0]);
$this->assertEquals(255, $c[1]);
$this->assertEquals(255, $c[2]);
$this->assertEquals(0, $c[3]);
}