1
0
mirror of https://github.com/mosbth/cimage.git synced 2025-07-31 13:40:08 +02:00

Added conversion to sRGB using option ?srgb. #120.

This commit is contained in:
Mikael Roos
2015-10-24 15:43:56 +02:00
parent aedce7021f
commit 7a98a44dd4
7 changed files with 38 additions and 15 deletions

View File

@@ -7,7 +7,8 @@ class CImageSRGBTest extends \PHPUnit_Framework_TestCase
{
private $srgbDir = "srgb";
private $cache;
private $srgbColorProfile = __DIR__ . '/../icc/sRGB_IEC61966-2-1_black_scaled.icc';
/**
@@ -37,8 +38,9 @@ class CImageSRGBTest extends \PHPUnit_Framework_TestCase
$filename = $img->convert2sRGBColorSpace(
'car.png',
IMAGE_PATH,
$this->cache
IMAGE_PATH,
$this->cache,
$this->srgbColorProfile
);
if (class_exists("Imagick")) {
@@ -62,7 +64,8 @@ class CImageSRGBTest extends \PHPUnit_Framework_TestCase
$filename = $img->convert2sRGBColorSpace(
'car.jpg',
IMAGE_PATH,
$this->cache
$this->cache,
$this->srgbColorProfile
);
$this->assertFalse($filename);