Crop an html5 uploaded Avatar and an html5 Avatar
In this example, HTML5 canvas is used to write the cropping effect of the uploaded avatar. You can drag and drop the uploaded avatar to crop it. Although the style is not easy to see, the function is still complete:
For the effect after cropping:
Html section:
JavaScr
// Pop up the actionsheet. Select how to get the Avatar// Obtain the image from the album-(void) takePictureClick :( UIButton *) sender {// * Note: to use it, you must implement the following protocol: UIImagePickerControllerDelegate, // UINavigationControllerDelegate // * // UIImagePickerController * picker = [[UIImagePickerController alloc] init]; // sets the image source (album) // picker. sourceType = UIImagePickerControllerSourceTypeSavedPhotosAl
Php: Create an instance of a circular user avatar _ custom encapsulation class source code, circular user avatar
Ideas
Three image layers must be created for the layer design.
1. Bottom Layer: The final generated image
2. Real user profile pictures: real profile pictures uploaded by users as intermediate layers
3. Circular mask: as the top layer, draw a circular area in the mask and set it to transparent.
Php creates a circular user avatar-custom encapsulation class source code and a circular user avatar
Ideas
Three image layers must be created for the layer design.
1. Bottom Layer: The final generated image
2. Real user profile pictures: real profile pictures uploaded by users as intermediate layers
3. Circular mask: as the top layer, draw a circular area in the mask and set it to transparent.
The Code is
Php implements the Avatar upload preview function, and php Avatar upload Preview
The example in this article shares with you the specific code for php to implement the Avatar upload preview function for your reference. The specific content is as follows:
Home Page 1.php
Processing page 2.php
Show:
Click the image position to display the selection box:
After
is uploaded successfully,
Size is the scaling ratio, default is 1, there are thumbnails when the magnification is reduced, if the thumbnail to the original 3/4,size 0.75
msg If result=1,msg is a file address, if RESULT=0,MSG is an error message
W,h is the height of the original image, and if there is a thumbnail, the thumbnail is wide.
Four, select the picture area
Avatar target size is 175*175 and is
1, in the mobile phone we open Alipay and then we click on "My" and then we click the "Personal Center" effect is shown below.
2, then we in the Open list interface, click the "Account Details" effect as shown below.
3, after we found the interface of the "Avatar" effect as shown below
4, then we click on the set avatar, you can choose to use an instant photo or choose from a photo
Avatar upload plug-in and Avatar plug-in
Uploading headers are a complicated task. Recently, I have helped my friends find a plug-in to share with you.
Ps: You can write various styles based on your design draft without any fixed plug-in styles;
Demo address: http://durenlong.gitee.io/uploading
Code address: https://gitee.com/durenlong/uploading
Ps: there are only four key tags that correspond to each ot
Php funny Avatar puzzles, php Avatar puzzles
When studying the GD library of php, I found a piece of code written by others. Here I hope to increase everyone's enthusiasm for php. This code mosaic the person's profile picture, which looks interesting.
function pixelfuck($url, $chars='ewk34543§G§$§$Tg34g4g', $shrpns=1, $size=4,$weight=2){ list($w, $h, $type) = getimagesize($url); $resource = imagecre
Custom avatar processing is lightweight and practical. There are a lot of powerful tips in it. Come and praise me ^ _ ^, Avatar tipsThe Method Code introduced in this article is all the key points. If you need other things, complete them by yourself.
Note that in the Code on the following page, every comment is basically a practical, powerful, and interesting technique !! Will anyone be excited when I see t
The anime movie "Your Name" is being released, this animation led to the development of the surrounding goods, such as your name with the same filter, now every day p figure also introduced a new function, so that you can travel through the lead, make your name anime head, that how to make your name anime head? Now let's look at your name in the script house. Anime head Making Method!
Your name anime avatar how to make?
First open every day p fig
Method One, through the public number to operate
1, we open in the phone "micro-letter" and then enter the "subscription number" as shown in the following figure.
2, then in the open "subscription number" We go to search "Songjiang micro-life" to find "Songjiang micro-life" this page.
3, and then find "Songjiang micro-life", send you need to add a picture of V, and then need to wait for the "success Plus v" response, download plus V of the picture, and then replace your micro-letter
1, we first download a "Beauty Mito" installed in the computer, and then open the United States Mito click on "New" a canvas, and then set a color, as shown in the following figure.
3, then we click on "crop," save.
4, then we import the avatar, and then we then right button, and then the picture import after we click Settings, transparency
5, then we click enter "text" after setting the font position
6, then we cli
1 in the mobile phone first open "beautiful said" and then we log in after the beauty of the said click "I" specific as the figure.
2 in access to my interface we will see an account, and then we click on the "account" to enter after we click on the "Avatar" can be.
3 OK to enter the selection of photos we can from the phone album to find and can immediately use the "take photos" to the photo, this custom bar. As I now choose from the phone's al
To the U.S. Mito software users to detailed analysis to share the production of Casio Avatar Tutorial.
Tutorial Sharing:
Effect Chart:
The first step, open the United States Mito.
Second step, open this material.
Step three, then right, and insert a picture.
Step fourth, pull the photo up and cover the white area.
The fifth step, after the right button, will be thick line a positive stack, the screensh
WordPress in Gravatar avatar cache to local and related optimization techniques,
The purpose of the Gravatar global avatar cache is to speed up the opening of the website, because the Gravatar website's server is abroad, plus the great GFW, the domestic opening speed is often very slow. The method came from Willin, but it seems that his website has not been opened--Cache Gravatar Global
Get_avatar () (Get Avatar)the Get_avatar () function is used to get the top mailbox or the user's avatar code, which is very common in the comment list.
This function provides a Get_avatar filter to filter the Avatar's Html code (the IMG tag).
Returns False if display avatar options is turned off in discussion in background settings.
Usage
Get_avatar (
1. What is Gravatar?
Gravatar is a service launched by www.gravatar.com, meaning "global Avatar". If the account is registered on the Gravatar and the avatar is placed on the Gravatar server, then when you speak on a blog that supports Gravatar, you can display an avatar that is associated with email as long as you provide an email address. This will provide yo
The purpose of the Gravatar global avatar cache is to speed up the opening of the site, because the Gravatar official website of the server in foreign countries, plus the great GFW, the domestic opening speed is often very slow. The method comes from Willin, but it seems that his website has not been openedCache Gravatar Global Avatar to LocalThe caching method is as follows:
1. Create cache DirectoryIn th
This article describes how to compile PHP scripts for obtaining and customizing avatar images in WordPress, including get_avatar () and alt tags. For more information, see
Get_avatar () (get Avatar)The get_avatar () function is used to obtain the code of the top mailbox or user's profile picture, which is frequently used in the comment list.
This function provides a get_avatar filter to filter the Html cod
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.