3

I'm having an issue using the getImageCompression() method from Imagick. When I use it I receive an error (haven't found any problem with any of the other methods so far):

$img = new imagick('/path/to/jpeg');
$img->getImageCompose(); // some value
$img->getImageCompression(); // Call to undefined method Imagick::getImageCompression()
$img->getImageCompressionQuality(); // some value

I'm running PHP 5.3.10 with php5-imagick 3.1.0 (I know it's in beta, but getImageCompression() was released in 2.2.2) and ImageMagick 6.6.9-7.

Am I missing something or is the getImageCompression() method effectively missing (if so, is there an alternative for retrieving the image compression)?

3
  • +1 Nice question. Nicely formatted. Well explained. And you did your research. I wish every question was as good as yours! Commented Aug 1, 2012 at 8:53
  • Have you restarted your webserver? Some distributions do not restart the webserver after installing php-* packages so you need to do this manually to reload php files and new php modules. Commented Aug 1, 2012 at 9:13
  • I'm using PHP cli and AFAIK there is nothing to restart (sorry for not mentioning that in question). php -r "print_r(phpinfo());" | grep imagick gives me imagick module enabled with version 3.1.0RC1 Commented Aug 1, 2012 at 9:48

1 Answer 1

2

I can't find this method, neither in 2.2.2 nor in 3.1.0RC2

Setters are present (setImageCompression()) ; other getters you quoted are present too.

Seems like the manual is lying.

Sign up to request clarification or add additional context in comments.

3 Comments

That's what I thought. There doesn't seem to be any open bugs about it either: bugs.php.net/…, opening one then, will accept your answer as soon as bug is confirmed...
doesn't seem to be much activity with the bug, so accepting your answer before I forget about it.
@user359650 thanks, I hope for all of us they'll answer soon.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.