问题
Can anyone recommend a wrapper class for the gd library?
I've found a few, but they just have basic image manipulation functions, such as flipping, reversing, etc.
I am really drawing here, so I want all the line, point, geometric figure, and color functions. And a basic palette, so I don't have to go through the hassle of defining basic colors all the time :Þ
Edit: My webhost doesn't have 5.3 available. Surely there must be a class that doesn't rely on 5.3 features?
回答1:
Imagine is an OO wrapper for GD and Imagick. It abstracts out the need for GD or Imagick specific image manipulation code for alot of the basic (and some advanced) functions.
回答2:
ImageArtist is a pure GD wrapper which makes image manipulation insanely easy, authored by Treinetic (pvt) ltd.
some hosting providers does not have ImageMagic installed but most of them has GD extension installed so you can expect the code you write will work across local and remote servers.
来源:https://stackoverflow.com/questions/5162478/php-wrapper-class-for-gd