| @@ 49-62 (lines=14) @@ | ||
| 46 | /** |
|
| 47 | * {@inheritdoc} |
|
| 48 | */ |
|
| 49 | public function getColorSpace() |
|
| 50 | { |
|
| 51 | switch ($this->gmagick->getimagecolorspace()) { |
|
| 52 | case \Gmagick::COLORSPACE_RGB: |
|
| 53 | case \Gmagick::COLORSPACE_SRGB: |
|
| 54 | return ColorSpace::COLOR_SPACE_RGB; |
|
| 55 | case \Gmagick::COLORSPACE_CMYK: |
|
| 56 | return ColorSpace::COLOR_SPACE_CMYK; |
|
| 57 | case \Gmagick::COLORSPACE_GRAY: |
|
| 58 | return ColorSpace::COLOR_SPACE_GRAYSCALE; |
|
| 59 | default: |
|
| 60 | throw new RuntimeException('Only RGB, grayscale and CMYK colorspace are currently supported'); |
|
| 61 | } |
|
| 62 | } |
|
| 63 | ||
| 64 | /** |
|
| 65 | * {@inheritdoc} |
|
| @@ 49-62 (lines=14) @@ | ||
| 46 | /** |
|
| 47 | * {@inheritdoc} |
|
| 48 | */ |
|
| 49 | public function getColorSpace() |
|
| 50 | { |
|
| 51 | switch ($this->imagick->getImageColorspace()) { |
|
| 52 | case \Imagick::COLORSPACE_RGB: |
|
| 53 | case \Imagick::COLORSPACE_SRGB: |
|
| 54 | return ColorSpace::COLOR_SPACE_RGB; |
|
| 55 | case \Imagick::COLORSPACE_CMYK: |
|
| 56 | return ColorSpace::COLOR_SPACE_CMYK; |
|
| 57 | case \Imagick::COLORSPACE_GRAY: |
|
| 58 | return ColorSpace::COLOR_SPACE_GRAYSCALE; |
|
| 59 | default: |
|
| 60 | throw new RuntimeException('Only RGB, grayscale and CMYK colorspace are currently supported'); |
|
| 61 | } |
|
| 62 | } |
|
| 63 | ||
| 64 | /** |
|
| 65 | * {@inheritdoc} |
|