diff --git a/README.md b/README.md index af48ddb..aae455c 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ Image conversion on the fly using PHP [![Join the chat at https://gitter.im/mosbth/cimage](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mosbth/cimage?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build Status](https://travis-ci.org/mosbth/cimage.svg?branch=resize)](https://travis-ci.org/mosbth/cimage) +[![CircleCI](https://circleci.com/gh/mosbth/cimage.svg?style=svg)](https://circleci.com/gh/mosbth/cimage) [![Build Status](https://scrutinizer-ci.com/g/mosbth/cimage/badges/build.png?b=resize)](https://scrutinizer-ci.com/g/mosbth/cimage/build-status/resize) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/mosbth/cimage/badges/quality-score.png?b=resize)](https://scrutinizer-ci.com/g/mosbth/cimage/?branch=resize) [![Code Coverage](https://scrutinizer-ci.com/g/mosbth/cimage/badges/coverage.png?b=resize)](https://scrutinizer-ci.com/g/mosbth/cimage/?branch=resize) diff --git a/src/CImage/CAsciiArt.php b/src/CImage/CAsciiArt.php index 6a9a758..a2cadf0 100644 --- a/src/CImage/CAsciiArt.php +++ b/src/CImage/CAsciiArt.php @@ -1,4 +1,7 @@ log("# Converting image to sRGB colorspace."); } - if (!class_exists("Imagick")) { + if (!class_exists("\Imagick")) { $this->log(" Ignoring since Imagemagick is not installed."); return false; } @@ -2585,7 +2588,7 @@ class CImage // Only convert if cachedir is writable if (is_writable($this->saveFolder)) { // Load file and check if conversion is needed - $image = new Imagick($this->pathToImage); + $image = new \Imagick($this->pathToImage); $colorspace = $image->getImageColorspace(); $this->log(" Current colorspace: " . $colorspace); @@ -2593,13 +2596,13 @@ class CImage $hasICCProfile = (array_search('icc', $profiles) !== false); $this->log(" Has ICC color profile: " . ($hasICCProfile ? "YES" : "NO")); - if ($colorspace != Imagick::COLORSPACE_SRGB || $hasICCProfile) { + if ($colorspace != \Imagick::COLORSPACE_SRGB || $hasICCProfile) { $this->log(" Converting to sRGB."); $sRGBicc = file_get_contents($iccFile); $image->profileImage('icc', $sRGBicc); - $image->transformImageColorspace(Imagick::COLORSPACE_SRGB); + $image->transformImageColorspace(\Imagick::COLORSPACE_SRGB); $image->writeImage($this->cacheFileName); return $this->cacheFileName; } diff --git a/src/CImage/CImageResizer.php b/src/CImage/CImageResizer.php index 18bb570..3d27ca0 100644 --- a/src/CImage/CImageResizer.php +++ b/src/CImage/CImageResizer.php @@ -1,4 +1,7 @@ setBaseWidthHeight(100, 100); } diff --git a/test/CImageSRGBTest.php b/test/CImageSRGBTest.php index 906220f..955d117 100644 --- a/test/CImageSRGBTest.php +++ b/test/CImageSRGBTest.php @@ -1,4 +1,7 @@