mirror of
https://github.com/Intervention/image.git
synced 2025-08-23 14:02:47 +02:00
feature/strip encoder parameter (#1421)
Add config option and encoder parameter to strip meta data in the encoding process. --------- Co-authored-by: Thomas <thomas@sctr.net>
This commit is contained in:
@@ -24,11 +24,13 @@ final class ConfigTest extends BaseTestCase
|
||||
autoOrientation: false,
|
||||
decodeAnimation: false,
|
||||
blendingColor: 'f00',
|
||||
strip: true,
|
||||
);
|
||||
$this->assertInstanceOf(Config::class, $config);
|
||||
|
||||
$this->assertFalse($config->autoOrientation);
|
||||
$this->assertFalse($config->decodeAnimation);
|
||||
$this->assertTrue($config->strip);
|
||||
$this->assertEquals('f00', $config->blendingColor);
|
||||
}
|
||||
|
||||
@@ -37,12 +39,14 @@ final class ConfigTest extends BaseTestCase
|
||||
$config = new Config();
|
||||
$this->assertTrue($config->autoOrientation);
|
||||
$this->assertTrue($config->decodeAnimation);
|
||||
$this->assertFalse($config->strip);
|
||||
$this->assertEquals('ffffff', $config->blendingColor);
|
||||
|
||||
$result = $config->setOptions(
|
||||
autoOrientation: false,
|
||||
decodeAnimation: false,
|
||||
blendingColor: 'f00',
|
||||
strip: true,
|
||||
);
|
||||
|
||||
$this->assertFalse($config->autoOrientation);
|
||||
@@ -51,16 +55,19 @@ final class ConfigTest extends BaseTestCase
|
||||
|
||||
$this->assertFalse($result->autoOrientation);
|
||||
$this->assertFalse($result->decodeAnimation);
|
||||
$this->assertTrue($result->strip);
|
||||
$this->assertEquals('f00', $result->blendingColor);
|
||||
|
||||
$result = $config->setOptions(blendingColor: '000');
|
||||
|
||||
$this->assertFalse($config->autoOrientation);
|
||||
$this->assertFalse($config->decodeAnimation);
|
||||
$this->assertTrue($config->strip);
|
||||
$this->assertEquals('000', $config->blendingColor);
|
||||
|
||||
$this->assertFalse($result->autoOrientation);
|
||||
$this->assertFalse($result->decodeAnimation);
|
||||
$this->assertTrue($result->strip);
|
||||
$this->assertEquals('000', $result->blendingColor);
|
||||
}
|
||||
|
||||
@@ -71,13 +78,16 @@ final class ConfigTest extends BaseTestCase
|
||||
'autoOrientation' => false,
|
||||
'decodeAnimation' => false,
|
||||
'blendingColor' => 'f00',
|
||||
'strip' => true,
|
||||
]);
|
||||
|
||||
$this->assertFalse($config->autoOrientation);
|
||||
$this->assertFalse($config->decodeAnimation);
|
||||
$this->assertTrue($config->strip);
|
||||
$this->assertEquals('f00', $config->blendingColor);
|
||||
$this->assertFalse($result->autoOrientation);
|
||||
$this->assertFalse($result->decodeAnimation);
|
||||
$this->assertTrue($result->strip);
|
||||
$this->assertEquals('f00', $result->blendingColor);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user