php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59237 Call to undefined method Imagick::setColorspace()
Submitted: 2010-05-27 14:44 UTC Modified: 2010-05-27 14:54 UTC
From: ajones at umces dot edu Assigned:
Status: Not a bug Package: imagick (PECL)
PHP Version: 5.2.13 OS: Linux
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.
Password:
Status:
Package:
Bug Type:
Summary:
From: ajones at umces dot edu
New email:
PHP Version: OS:

 

 [2010-05-27 14:44 UTC] ajones at umces dot edu
Description:
------------
I just upgraded to the SVN to be able to use the new Imagick::setColorspace() method, but I still get this error:

 Call to undefined method Imagick::setColorspace()

when I attempt:

$im->setColorspace(Imagick::COLORSPACE_RGB);

Thanks,
Adrian

Reproduce code:
---------------
$im = new imagick();
$im->setOption("pdf:use-cropbox","true");
$im->setColorspace(Imagick::COLORSPACE_RGB);
$im->setResolution($resolution,$resolution);
$im->readImage($pdf_filepath);

$im->setImageFormat("jpg");
$im->scaleImage($width, $height);
$im->writeImage($jpg_filepath);

header("Content-type: image/jpeg");
echo $im;

Expected result:
----------------
Set the colorspace before reading the image

Actual result:
--------------
This error and no image produced

Call to undefined method Imagick::setColorspace()

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-05-27 14:54 UTC] adrianbjones at yahoo dot com
Sorry - it is working perfectly - user error was to blame. Thanks so much for adding this method!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 05 16:01:30 2024 UTC