调整图像大小 [英] resizing a image

查看:91
本文介绍了调整图像大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨.....我有这个脚本(在#1下面)链接到另一个php文件SimpleImage.php(#2)我试图让它在我上传的图像上工作,但它不断出现错误。 ....我没有改变任何东西,除了:


$ image-> load(''picture.jpg'');

$ image->调整大小(546,403);

$ image-> save(''picture2.jpg'');


我把变量放了我需要在那里 "而不是''''我总是得到一个错误消息.....我在做什么或不能用于我需要的规模



#1

hi.....i have this script (below #1) that is linked to another php file SimpleImage.php (#2) im trying to get it to work on my uploaded images but it keeps coming up errors.....i haven''t altered anything except for:

$image->load(''picture.jpg'');
$image->resize(546,403);
$image->save(''picture2.jpg'');

I put the variables i need in there within " " instead of '' '' and i always get a error message.....am i doing something or cant this be used to the scale i require


#1

展开 | 选择 | Wrap | 行号

推荐答案

image-> load(''picture.jpg'');
image->load(''picture.jpg'');


image-> resize(546,403);
image->resize(546,403);


image-> save(''picture2.jpg'' );


我把我需要的变量放在那里 "而不是''''我总是得到一个错误消息.....我在做什么或不能用于我需要的规模



#1
image->save(''picture2.jpg'');

I put the variables i need in there within " " instead of '' '' and i always get a error message.....am i doing something or cant this be used to the scale i require


#1
展开 | 选择 | Wrap | 行号


这篇关于调整图像大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆