开发者

Photo dimensions & conversions of user albums?

开发者 https://www.devze.com 2023-01-16 14:07 出处:网络
Are there any php libraries for 开发者_JS百科this to re-scale or re-size photos down to whatever limit we set for height/width/size and also if users upload photos in gif png, or bmp then convert them

Are there any php libraries for 开发者_JS百科this to re-scale or re-size photos down to whatever limit we set for height/width/size and also if users upload photos in gif png, or bmp then convert them to jpeg?


Are there any php libraries for this to re-scale or re-size photos down to whatever limit we set for height/width/size and also if users upload photos in gif png, or bmp then convert them to jpeg?

GD and ImageMagick

(I'm ignoring the rest of your questions as they aren't programming related. I suggest you edit and remove those sections.)


What aspect ratio and file sizes to use are largely subjective, but there are a few guidelines you may want to follow.

For aspect ratio the best thing to do (photographically at least) is to keep the same aspect as the original. I'd avoid stretching the photo in any way. If you have to, maybe crop it to fit a certain aspect ratio.

For file size, it really depends on what you want to do. Make them larger if you really want to retain a lot of quality and resolution.

There are many libraries available for image editing in PHP. I typically use GD. http://ca3.php.net/manual/en/refs.utilspec.image.php

0

精彩评论

暂无评论...
验证码 换一张
取 消