PHP class that extends GD2 library