| @@ 110-123 (lines=14) @@ | ||
| 107 | /** |
|
| 108 | * {@inheritdoc} |
|
| 109 | */ |
|
| 110 | public function getColorSpace() |
|
| 111 | { |
|
| 112 | switch ($this->gmagick->getimagecolorspace()) { |
|
| 113 | case \Gmagick::COLORSPACE_RGB: |
|
| 114 | case \Gmagick::COLORSPACE_SRGB: |
|
| 115 | return ColorSpace::COLOR_SPACE_RGB; |
|
| 116 | case \Gmagick::COLORSPACE_CMYK: |
|
| 117 | return ColorSpace::COLOR_SPACE_CMYK; |
|
| 118 | case \Gmagick::COLORSPACE_GRAY: |
|
| 119 | return ColorSpace::COLOR_SPACE_GRAYSCALE; |
|
| 120 | default: |
|
| 121 | throw new RuntimeException('Only RGB, grayscale and CMYK color space are currently supported'); |
|
| 122 | } |
|
| 123 | } |
|
| 124 | ||
| 125 | /** |
|
| 126 | * {@inheritdoc} |
|
| @@ 111-124 (lines=14) @@ | ||
| 108 | /** |
|
| 109 | * {@inheritdoc} |
|
| 110 | */ |
|
| 111 | public function getColorSpace() |
|
| 112 | { |
|
| 113 | switch ($this->imagick->getImageColorspace()) { |
|
| 114 | case \Imagick::COLORSPACE_RGB: |
|
| 115 | case \Imagick::COLORSPACE_SRGB: |
|
| 116 | return ColorSpace::COLOR_SPACE_RGB; |
|
| 117 | case \Imagick::COLORSPACE_CMYK: |
|
| 118 | return ColorSpace::COLOR_SPACE_CMYK; |
|
| 119 | case \Imagick::COLORSPACE_GRAY: |
|
| 120 | return ColorSpace::COLOR_SPACE_GRAYSCALE; |
|
| 121 | default: |
|
| 122 | throw new RuntimeException('Only RGB, grayscale and CMYK color space are currently supported'); |
|
| 123 | } |
|
| 124 | } |
|
| 125 | ||
| 126 | /** |
|
| 127 | * {@inheritdoc} |
|