php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74649 exportImagePixels bug with 16bit TIFF
Submitted: 2017-05-24 20:01 UTC Modified: 2017-05-24 21:57 UTC
From: jan dot gajos at agzeta dot pl Assigned:
Status: Closed Package: imagick (PECL)
PHP Version: 7.0.19 OS: Windows 10
Private report: No CVE-ID: None
 [2017-05-24 20:01 UTC] jan dot gajos at agzeta dot pl
Description:
------------
When exportImagePixels is calling with TIFF 16bit grayscale picture, an array with all elements = 0 is returned for map = R,G,B,O,I,P and max value (eg 65535 for INTEGER, 255 for CHAR) for map = A. 





Test script:
---------------
$im = new Imagick();
$im->readImage('picture.tif');
$arr = $im->exportImagePixels(10,10,10,10,'I',imagick::PIXEL_QUANTUM);
var_dump( $arr );

Expected result:
----------------
array with INTEGER or FLOAT values depend on 6th parameter

Actual result:
--------------
array(16) {
  [0]=>
  int(0)
  [1]=>
  int(0)
  [2]=>
  int(0)
  [3]=>
  int(0)
  [4]=>
  int(0)
  [5]=>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-05-24 21:57 UTC] jan dot gajos at agzeta dot pl
-Status: Open +Status: Closed
 [2017-05-24 21:57 UTC] jan dot gajos at agzeta dot pl
Problem is with 6th para
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 23:01:30 2024 UTC