简体   繁体   English

图像裁剪PHP

[英]image cropping php

I want images at the size of 400 height, 800 width px, 我想要大小为400高度,800宽度px的图像,

if they're under the given size it'll error it out but if they are above (ex 1200 width 900 height) I want it to crop the image on the center verticaly and horizontally and upload it with the cropped dimensions 如果它们小于给定的大小,则会出错,但是如果它们大于(例如1200宽度900高度),我希望它在垂直和水平方向上对图像进行裁剪,然后将其与裁剪后的尺寸一起上传

some help would be appreciated, some code to give me the idea 一些帮助,将不胜感激,一些代码给我的想法

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM