本文介绍了最佳PHP图像裁剪类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在设计一个网站,我需要:




  • 上传图片

  • 验证它是一个图像(而不是,我不知道.... a病毒:))

  • 调整图片大小

  • convert to jpg



基本上基本的图片上传



而不是写我自己的,我试图找到一个 php 类,让我们做所有这一切,因为正如Jeff Atwood所说,(我知道它看起来像一个重复,但它不是因为它要求一个URL抓取器)








  • 有没有人有这些类的任何经验?您能推荐一个优秀的图片上传类吗?

    解决方案

    我倾向于使用一个描述框架,上传部分。但是,请为裁剪位建议:



    想象 -



    如果你想让上传者比只是一个input type =文件稍微好一些,请试试: p>


    I'm designing a website and I need to:

    • Upload the image
    • Validate that it's an image (and not, oh I don't know.... a virus :) )
    • Resize the Image
    • convert to jpg

    Essentially basic image upload

    Instead of writing my own I'm trying to find a php class that let's me do all this, because as Jeff Atwood said, "never design what you can steal"

    Now before you go ahead and downvote because I didn't do my research, I did:

    Googling this brings up a huge amount of results, which is the problem, I don't know which results are useful and which are trash!

    So far, Ive found:

    Does anyone have any experience with these classes? Can you recommend an outstanding image upload class?

    解决方案

    I tend to use a framework of one description or another, which cover's the file upload part. However, do have a recommendation for the cropping bit:

    Imagine - https://github.com/avalanche123/Imagine

    And if you want to make the uploader a tiny bit better than just an input type=file, try:

    https://github.com/valums/file-uploader

    这篇关于最佳PHP图像裁剪类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

    08-31 04:29