php.net |  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
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
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();


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-08-02 12:36 UTC] cmb@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

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 <http://sscce.org/>.
 [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: Fri Apr 26 07:01:32 2024 UTC