mirror of
https://github.com/Intervention/image.git
synced 2025-08-30 09:10:21 +02:00
Remove compression type & bitDepth parameters for now
This commit is contained in:
@@ -9,8 +9,6 @@ use Intervention\Image\Interfaces\ImageInterface;
|
|||||||
abstract class AbstractEncoder implements EncoderInterface
|
abstract class AbstractEncoder implements EncoderInterface
|
||||||
{
|
{
|
||||||
public const DEFAULT_QUALITY = 75;
|
public const DEFAULT_QUALITY = 75;
|
||||||
public const DEFAULT_COMPRESSION = 0;
|
|
||||||
public const DEFAULT_BIT_DEPTH = 8;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Target quality of encoder
|
* Target quality of encoder
|
||||||
@@ -19,20 +17,6 @@ abstract class AbstractEncoder implements EncoderInterface
|
|||||||
*/
|
*/
|
||||||
public int $quality = self::DEFAULT_QUALITY;
|
public int $quality = self::DEFAULT_QUALITY;
|
||||||
|
|
||||||
/**
|
|
||||||
* Compression type of encoder
|
|
||||||
*
|
|
||||||
* @param int $compression
|
|
||||||
*/
|
|
||||||
public int $compression = self::DEFAULT_COMPRESSION;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Bit depth per channel at which the images are encoded
|
|
||||||
*
|
|
||||||
* @param int $bitDepth
|
|
||||||
*/
|
|
||||||
public int $bitDepth = self::DEFAULT_BIT_DEPTH;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create new encoder instance
|
* Create new encoder instance
|
||||||
*
|
*
|
||||||
@@ -43,12 +27,8 @@ abstract class AbstractEncoder implements EncoderInterface
|
|||||||
{
|
{
|
||||||
if (is_array($options) && array_is_list($options)) {
|
if (is_array($options) && array_is_list($options)) {
|
||||||
$this->quality = $options[0] ?? self::DEFAULT_QUALITY;
|
$this->quality = $options[0] ?? self::DEFAULT_QUALITY;
|
||||||
$this->compression = $options[1] ?? self::DEFAULT_COMPRESSION;
|
|
||||||
$this->bitDepth = $options[2] ?? self::DEFAULT_BIT_DEPTH;
|
|
||||||
} else {
|
} else {
|
||||||
$this->quality = $options['quality'] ?? self::DEFAULT_QUALITY;
|
$this->quality = $options['quality'] ?? self::DEFAULT_QUALITY;
|
||||||
$this->compression = $options['compression'] ?? self::DEFAULT_COMPRESSION;
|
|
||||||
$this->bitDepth = $options['bitDepth'] ?? self::DEFAULT_BIT_DEPTH;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user