Bug #81657 [NEW]: Imagick::getColorSpace() always returns 0

From: Date: Thu, 25 Nov 2021 11:56:20 +0000
Subject: Bug #81657 [NEW]: Imagick::getColorSpace() always returns 0
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-237977@lists.php.net to get a copy of this message
From:             krejcir at ics dot muni dot cz
Operating system: Debian 11
PHP version:      7.4.26
Package:          *Graphics related
Bug Type:         Bug
Bug description:Imagick::getColorSpace() always returns 0

Description:
------------
Calling Imagick::getColorspace() always returns
imagick::COLORSPACE_UNDEFINED (0), no matter what is an input image.
Trying to call CLI tool "identify" always returns correct color space.

This is observed on actual Debian 11: 
php  Version: 2:7.4+76
imagemagick Version: 8:6.9.11.60+dfsg-1.3
php-imagick Version: 3.4.4+php8.0+3.4.4-2+deb11u2

Test script:
---------------
<?php

$image = new Imagick($argv[1]);
var_dump($image->getColorSpace());

?>

Expected result:
----------------
! imagick::COLORSPACE_UNDEFINED

Actual result:
--------------
imagick::COLORSPACE_UNDEFINED

-- 
Edit bug report at https://bugs.php.net/bug.php?id=81657&edit=1
-- 
Fix committed:                    https://bugs.php.net/fix.php?id=81657&r=fixed
Fixed in release:                 https://bugs.php.net/fix.php?id=81657&r=alreadyfixed
Need backtrace:                   https://bugs.php.net/fix.php?id=81657&r=needtrace
Need Reproduce Script:            https://bugs.php.net/fix.php?id=81657&r=needscript
Try newer version:                https://bugs.php.net/fix.php?id=81657&r=oldversion
Not developer issue:              https://bugs.php.net/fix.php?id=81657&r=support
Expected behavior:                https://bugs.php.net/fix.php?id=81657&r=notwrong
Not enough info:                  https://bugs.php.net/fix.php?id=81657&r=notenoughinfo
Submitted twice:                  https://bugs.php.net/fix.php?id=81657&r=submittedtwice
register_globals:                 https://bugs.php.net/fix.php?id=81657&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=81657&r=phptooold
Daylight Savings:                 https://bugs.php.net/fix.php?id=81657&r=dst
IIS Stability:                    https://bugs.php.net/fix.php?id=81657&r=isapi
Install GNU Sed:                  https://bugs.php.net/fix.php?id=81657&r=gnused
Floating point limitations:       https://bugs.php.net/fix.php?id=81657&r=float
No Zend Extensions:               https://bugs.php.net/fix.php?id=81657&r=nozend
MySQL Configuration Error:        https://bugs.php.net/fix.php?id=81657&r=mysqlcfg


Thread (2 messages)

« previous php.bugs (#237977) next »