|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2020-07-05 13:09 UTC] rowan dot collins at gmail dot com
[2021-08-02 12:36 UTC] cmb@php.net
-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: cmb
[2021-08-02 12:36 UTC] cmb@php.net
[2021-08-15 04:22 UTC] pecl-dev at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 20 19:00:01 2025 UTC |
Description: ------------ Cloned object is still showing wrong colorspace Information. Test script: --------------- $objImage = new Imagick(); $objImage->setResolution(300, 300); $objImage->readImage($strSourceFilePath); $arrImageInfo = array(); $arrImageInfo['type'] = $objImage->getImageType(); $arrImageInfo['resolution'] = $objImage->getImageResolution(); $arrImageInfo['resolutionUnit'] = $objImage->getImageUnits(); $arrImageInfo['width'] = $objImage->getImageWidth(); $arrImageInfo['height'] = $objImage->getImageHeight(); $arrImageInfo['colorSpace'] = $objImage->getImageColorspace(); $arrImageInfo['format'] = $objImage->getImageFormat(); if ($arrImageInfo['colorSpace'] != Imagick::COLORSPACE_RGB && $arrImageInfo['colorSpace'] != Imagick::COLORSPACE_SRGB && $arrImageInfo['colorSpace'] != Imagick::COLORSPACE_GRAY) { $objImage->setImageColorSpace(Imagick::COLORSPACE_RGB); } $objThumb = clone $objImage; $arrImageClone = array(); $arrImageClone ['type'] = $objThumb->getImageType(); $arrImageClone ['resolution'] = $objThumb->getImageResolution(); $arrImageClone ['resolutionUnit'] = $objThumb->getImageUnits(); $arrImageClone ['width'] = $objThumb->getImageWidth(); $arrImageClone ['height'] = $objThumb->getImageHeight(); $arrImageClone ['colorSpace'] = $objThumb->getImageColorspace(); $arrImageClone ['format'] = $objThumb->getImageFormat();