|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #52857 Access to gdImageSetClip() and gdImageGetClip()
Submitted: 2010-09-16 03:41 UTC Modified: 2016-09-24 13:44 UTC
Avg. Score:4.6 ± 0.7
Reproduced:26 of 26 (100.0%)
Same Version:25 (96.2%)
Same OS:19 (73.1%)
From: ljb9832 at pobox dot com Assigned: cmb (profile)
Status: Closed Package: GD related
PHP Version: 5.3.3 OS: N/A
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.
Bug Type:
From: ljb9832 at pobox dot com
New email:
PHP Version: OS:


 [2010-09-16 03:41 UTC] ljb9832 at pobox dot com
Since 2.0.12, libgd has supported a user-defined clipping rectangle using gdImageSetClip() and gdImageGetClip(). This clips all drawing operations to the specified area, and is a very useful capability. However, PHP does not expose these functions. Please consider adding a PHP function or functions to allow setting and getting the clipping boundaries. This could be two functions, imagesetclip($image, $x1, $y1, $x2, $y2) and imagegetclip($image), or a single function imageclip($image, [$x1, $y1, $x2, $y2]) which sets the clipping boundary if the arguments are provided, and returns the new or current boundary.


Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-07-23 14:07 UTC]
-Summary: Access to gdImageSetClip() +Summary: Access to gdImageSetClip() and gdImageGetClip()
 [2016-07-23 14:16 UTC]
I've submitted a respective PR
 [2016-09-24 13:44 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2016-09-24 13:44 UTC]
The PR has been merged. imagesetclip() and imagegetclip() will be
available as of PHP 7.2.0.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jul 20 01:01:29 2024 UTC