GD image functions wrapper