In an application to replace the user's avatar, generally have to take pictures and choose photos from the gallery two ways, now there are many open-source online, but many are too complex. And Android-crop This cubby small, the code is not complex,
In development, invoking system libraries and cropping photos is a common requirement. Compared to the realization of this function, the direct call system has many advantages, such as not to consider screen adaptation, do not worry about
How does PHP crop an image to a fixed size?
Make a homepage call Image, sometimes you need to get a fixed size image, because the image position of the homepage is usually specified by the designer, if it is for the latest published image
1, the overall effect chart:
2. Principle of realization:
(1) using the input onchange events to upload pictures asynchronously to the server
(2) Get the relative address of the uploaded picture, echo back to the IMG tag
(3) The use of Jcrop crop
An image may be displayed in different places, with different sizes and proportions. Therefore, it is useful to automatically crop the image in this example, if you have any requirement, you can check out the portal site. you must know that an image
PHP crop an image to a fixed size code method. When you create a homepage call image, you often need to obtain a fixed-size image, because the image position of the homepage is usually specified by the designer. if you want to call the latest
PHP crop an image to a fixed size code method. When you create a homepage call image, you often need to obtain a fixed-size image, because the image position of the homepage is usually specified by the designer. if you want to call the latest
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.