上传图片的缩略图 [英] Thumbnail for uploaded images
本文介绍了上传图片的缩略图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用php tp上传图片....我想知道如何创建图片缩略图?
解决方案我一直在使用我发现的类,当我需要做同样的事情,迄今为止,几乎没有修改它的作品很好。这里你去: SimpleImage Class
<?php
include('SimpleImage.php');
$ image = new SimpleImage();
$ image-> load('picture.jpg');
$ image->调整大小(250,400);
$ image-> save('picture2.jpg');
//以及班级网站上的更多示例。
?>
如果这不符合您的需求,php手册有很多功能可以帮助您实现所需。 图片
i am using php tp upload images.... i was wondering
- how to create thumbnails of images ?
- how to customize their dimensions & proportions ?
解决方案
I've been using a class I found when I needed to do the same thing and so far, with few modifications it works great. Here you go: SimpleImage Class
<?php
include('SimpleImage.php');
$image = new SimpleImage();
$image->load('picture.jpg');
$image->resize(250,400);
$image->save('picture2.jpg');
// and a lot more examples at the class website.
?>
If this does not suit your needs, php manual has lots of functions to help you achieving what you need. Image
这篇关于上传图片的缩略图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文