|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79786 clone of object is not cloning changed Colorspace
Submitted: 2020-07-04 13:19 UTC Modified: 2021-08-15 04:22 UTC
From: steve dot s at t-online dot de Assigned: cmb (profile)
Status: No Feedback Package: imagick (PECL)
PHP Version: 7.3.19 OS: Debian 9
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: steve dot s at t-online dot de
New email:
PHP Version: OS:


 [2020-07-04 13:19 UTC] steve dot s at t-online dot de
Cloned object is still showing wrong colorspace Information.

Test script:
$objImage = new Imagick();
                    $objImage->setResolution(300, 300);
                $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) {

$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();


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-07-05 13:09 UTC] rowan dot collins at gmail dot com
Please could you provide a clearer example, ideally one that can be reproduced easily to test potential fixes. Remember to include the _minimum_ code to reproduce the issue, the expected result, and the actual result - I'm assuming all these array assignments are irrelevant, and the actual test is to echo the value of $objThumb->getImageColorspace() immediately after cloning the object?
 [2021-08-02 12:36 UTC]
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-08-02 12:36 UTC]
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.

See <>.
 [2021-08-15 04:22 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Jul 18 17:01:29 2024 UTC