php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #61134 Missing "setimageopacity", "Set" Methods and "PixelPacket" Access
Submitted: 2012-02-18 13:24 UTC Modified: 2012-02-28 14:24 UTC
Votes:5
Avg. Score:4.6 ± 0.8
Reproduced:4 of 4 (100.0%)
Same Version:2 (50.0%)
Same OS:1 (25.0%)
From: victorneufeld at hotmail dot com Assigned:
Status: Open Package: gmagick (PECL)
PHP Version: Irrelevant OS: Ubuntu Linux/Mac
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: victorneufeld at hotmail dot com
New email:
PHP Version: OS:

 

 [2012-02-18 13:24 UTC] victorneufeld at hotmail dot com
Description:
------------
---
From manual page: http://www.php.net/book.gmagick
---
There are many parallels between Imagick and Gmagick functionality, but one key method seems to have been missed in Gmagick:

Imagick::setImageOpacity — Sets the image opacity level
    http://www.php.net/manual/en/imagick.setimageopacity.php

It appears that the GraphicsMagick PHP port may not support the GraphicsMagick "SetImageOpacity" method, but it's not certain.  I've tried variations on the name without success (eg. SetImageOpacity, setImageOpacity, setimageopacity).  The documentation may not be up to date, but I suspect that the method may have been missed.

    http://www.graphicsmagick.org/api/image.html#setimageopacity 

Test script:
---------------
//Instantiate a new Gmagick object
$image = new Gmagick('p5_abg.png');
$image->setimageopacity( 0.5 );
$image->write('p5_abg_halfopacity.png');


Expected result:
----------------
Same results that I get with Imagick version:

$image = new Imagick('p5_abg.png');
$image->setImageOpacity( 0.5 );
$image->writeImage('p5_abg_halfopacity.png');


Actual result:
--------------
PHP Fatal error:  Call to undefined method Gmagick::setimageopacity() in GMagickTest.php on line ##


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-02-28 14:24 UTC] victorneufeld at hotmail dot com
-Summary: Missing "SetImageOpacity" Method +Summary: Missing "setimageopacity", "Set" Methods and "PixelPacket" Access -Operating System: Ubuntu Linux +Operating System: Ubuntu Linux/Mac
 [2012-02-28 14:24 UTC] victorneufeld at hotmail dot com
As I examine and attempt to use the PHP class further, I am finding a number of other missing functions that further reduces its utility.  For example, there are a number of "get" functions defined in the PHP interface for which their corresponding "set" counterparts have not been included:

http://www.graphicsmagick.org/Magick++/Image.html#set-get-image-attributes

Furthermore the included "GmagickPixel" class does define a number of "get" and "set" functions that would be useful, but no means has been provided to gain access to those pixels, neutering their usefulness.  Interfaces to the following API functions would rectify this shortcoming:

http://www.graphicsmagick.org/Magick++/Image.html#pixelcolor
http://www.graphicsmagick.org/Magick++/Image.html#low-level-image-pixel-access
http://ca3.php.net/manual/en/class.imagickpixeliterator.php

Compare Gmagick to its closely-related Imagick counterpart, the latter of which has been richly translated to PHP.  I have used GraphicsMagick command-line for some time and would prefer to use its PHP equivalent, but am being hampered by the partial implementation.  I would prefer to take advantage of its purported faster processing, but can't do without the missing functionality so may end up having to use Imagick instead.

http://www.graphicsmagick.org/benchmarks.html
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 13:01:30 2024 UTC