开发者

How to resize and display images from another domain using php?

I want to resize images using php. with out losing its quality. Currently I have two domains. I have to display images from portfolio section of my old site to new website. How to resize the images and display in my new portfolio section. 开发者_C百科how can I do that?


There are many functions for creating images, all of which do not have a problem with external domains. For instance, imagecreatefromjpeg(). http://php.net/manual/en/function.imagecreatefromjpeg.php If you go to that link, and check out all the functions on the left, you will find ones that crop, resize, etc., and most of them have examples.

For your question, I believe the best way to go about it is create one image from your existing image, and create a blank new image, then use the imagecopyresized() function to copy from your portfolio image to the blank one.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜