문제

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. 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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top