1
0
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:
Oliver Vogel
2024-01-11 10:22:51 +01:00
parent 533278c9ea
commit 284fbff79b

View File

@@ -9,8 +9,6 @@ use Intervention\Image\Interfaces\ImageInterface;
abstract class AbstractEncoder implements EncoderInterface
{
public const DEFAULT_QUALITY = 75;
public const DEFAULT_COMPRESSION = 0;
public const DEFAULT_BIT_DEPTH = 8;
/**
* Target quality of encoder
@@ -19,20 +17,6 @@ abstract class AbstractEncoder implements EncoderInterface
*/
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
*
@@ -43,12 +27,8 @@ abstract class AbstractEncoder implements EncoderInterface
{
if (is_array($options) && array_is_list($options)) {
$this->quality = $options[0] ?? self::DEFAULT_QUALITY;
$this->compression = $options[1] ?? self::DEFAULT_COMPRESSION;
$this->bitDepth = $options[2] ?? self::DEFAULT_BIT_DEPTH;
} else {
$this->quality = $options['quality'] ?? self::DEFAULT_QUALITY;
$this->compression = $options['compression'] ?? self::DEFAULT_COMPRESSION;
$this->bitDepth = $options['bitDepth'] ?? self::DEFAULT_BIT_DEPTH;
}
}