我正准备放弃 GD,因为它在我的网站上操纵图像 - 这太糟糕了。
每个人都说使用 ImageMagick 因为它们比 GD 更好,但是 ImageMagick 与 Gmagick(图像处理的瑞士军刀)呢?
Zend 这里有一篇漂亮的文章http://devzone.zend.com/article/10531谈论他们。
在我离开 ImageMagick 之前,是否有动力使用 gmagick 来代替?
(PHP 5.3+)
编辑:询问两个库之间哪个更好有什么问题?我认为这是一个公平的问题。如果有人可以解释一个库相对于另一个库的优点,将有助于我和其他人阅读这个问题。为什么要关闭这样的问题?
编辑2:对于每个问我需要做什么的人:我认为这是不经意的:用户上传图像(可以是png/gif/bmp w/e)我需要转换为JPG,然后将其存储在数据库中,最终如果它们是太大了,我需要稍微调整一下它们的大小。
谢谢
I am in the step to abandon GD for manipulating image in my website - it is awful.
Everyone saying to use ImageMagick because they are better than GD, but what about ImageMagick vs Gmagick (Swiss Army knife of image processing)?
Zend has a pretty article here http://devzone.zend.com/article/10531 talking about them.
Before I will leave for ImageMagick are there any motivation to use gmagick instead?
(PHP 5.3+)
Edit: What's wrong with asking which is better between 2 libs? I think it's a fair question. If someone could explain the good-point of one lib over the other would help me and other people reading this question. Why close such a question??
Edit2: For everyone asking what I need to do: I think it's oblivious: users uploads images (than can be png/gif/bmp w/e) I need to convert in JPG and then store it in the database, eventually if they are too big I need to resize down them a bit.
Thanks
发布评论
评论(2)
根据 维基百科,GraphicsMagick 是 ImageMagick 5.5.2 的一个分支。
据我所知,GMagick 没有什么新功能;叉子专注于更好的性能和稳定性,正如 @Col 所说,你应该自己测试和比较。
从功能角度来看,如果一个库不仅仅需要基本的调整大小和裁剪操作,我个人更喜欢 ImageMagick,因为它有大量的、文档齐全且插图丰富的 包含数千个示例的库,效果非常好。 GraphicsMagick 似乎没有类似质量的文档。
自 5.5.2 版以来,GMagick 也可能没有向 IM 添加任何新功能。如果您错过了任何您需要的内容,可能值得检查一下 ImageMagick 更改日志。
从高度主观的角度来看,ImageMagick 绝对是更流行和知名的库,您可能会找到更多支持、示例和脚本。另外,我怀疑性能差异是否会在大多数用例中真正产生影响 - 根据我过去十年的经验,IM 不是最快的,但也不是最慢的图形处理库,并且非常适合大多数日常使用。
According to Wikipedia, GraphicsMagick is a fork from ImageMagick 5.5.2.
As far as I can see, GMagick comes with no new features; the fork is concentrating on better performance and stability, which as @Col says you should test and compare yourself.
From a feature perspective, if a library is needed for more than just basic resizing and cropping operations, I personally would prefer ImageMagick any day because of the vast, well-documented and illustrated library of thousands of examples which work very well. GraphicsMagick does not seem to have documentation of similar quality.
It's also likely that GMagick does not have whatever new features were added to IM since version 5.5.2. It may be worth checking out the ImageMagick change logs whether you're missing out on anything you need.
On a highly subjective note, ImageMagick is definitely the more popular and well-known library, and you are likely to find more support, examples and scripts for it. Also I doubt whether the performance differences are going to really make a difference in most use cases - in my experience over the past ten years, IM is not the fastest, but also not the slowest of graphics processing libraries and perfectly suitable for most everyday uses.
你不喜欢GD的什么?是 API 的问题、缺少功能还是性能的问题?
也许你可以尝试图形库imagine - 它有一个漂亮、干净的OOP API,可以使用GD、ImageMagick和GraphicsMagick作为“后端” ”。这样您还可以测试哪个库具有最佳性能,而无需更改图像处理代码。
What is it you don't like about GD? Is it the API, is it missing features or is it performance?
Perhaps you can try the graphics library imagine - it has a nice, clean OOP API and can uses GD, ImageMagick and GraphicsMagick as "backends". This way you can also test which library has the best performance, without having to change your image manipulation code.