在 CakePHP 中,您使用过的最好的图像上传/调整大小组件是什么?

发布于 2024-08-26 07:18:55 字数 94 浏览 4 评论 0原文

我正在寻找可以属于许多模型的东西,并且希望也具有内置的所有调整大小功能。

想知道是否有任何好的建议,我不想选择错误的。

或者是否值得自己构建?

Im looking for somthing that can belong to many many models and, hopfully, has all the resizing functionality built in too.

Wondering if there's any good suggestions out there, I don't want to pick the wrong one.

Or is it just worth building my own?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

最美的太阳 2024-09-02 07:18:55

几年前,我为 Cake 1 编写了一个非常漂亮的图像上传组件。现在我不知道代码在哪里,但我的朋友 Koa 不久前写了一篇文章:

http://labs.iamkoa.net/2007/10/23/image-upload -component-cakephp/

http://labs.iamkoa.net/2007/11/06/multiple-image-uploads-into-single-mysql-table-cakephp/

可能是你可以破解的东西。它处理上传、调整大小(调整大小、裁剪、调整大小然后裁剪、最大、混合),如果我没记错的话,它甚至可能做过滤器(翻转、反转、灰度)。

我还将代码移植到 Zend 框架(和 PEAR 文件命名)以用于我的新内容管理框架。现在一切都包含在内并且好多了(完成了我上面提到的所有事情并且有很好的文档记录)。您可以在这里下载(查看 ImageManipulator 类。我认为 FileUploader class 依赖于我的 String utils 类,如果你想使用它,你可以轻松删除它,

否则,我说 Cake 中的组件架构一开始让我感到困惑,所以如果你想学习 XP,它可能是一个很好的选择。如果您还不知道,您可以获取某人的上传器并将其转换为您的 Cake 应用程序的组件。

I wrote a pretty sweet image upload component a few years ago for Cake 1. I don't have a clue where the code is these days, but my friend Koa did a write up on it a while back:

http://labs.iamkoa.net/2007/10/23/image-upload-component-cakephp/

http://labs.iamkoa.net/2007/11/06/multiple-image-uploads-into-single-mysql-table-cakephp/

Might be something you can hack. It handles uploads, resizing (resize, crop, resize then crop, max, mix) and if I remember correctly, it might even do filters (flipping, inverse, greyscale).

I also ported the code to Zend framework (and PEAR file naming) for my new content management framework. It's all contained and much better now (does all the things I mentioned above and is pretty well documented). You can download that here (check out the ImageManipulator class. I think the FileUploader class has a dependency on my String utils class which you could easily remove if you want to use that.

Otherwise, I say roll your own. The component architecture in Cake was confusing to me at first so it could be a good learning XP if you don't know it yet. If you do, you can just grab someones uploader and convert it into a component for your Cake application.

颜漓半夏 2024-09-02 07:18:55

获取图像的 EXIF/元信息怎么样?

How about for getting EXIF/Meta info of the image?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文