Picture width is not fixed, the same realization of self-adaptation, stretching and cutting not deformation, adapt to the major compatibility.Let's look at two different photos on the Internet: No.2From a wide view of a house, it is difficult to adapt to self-adaptation, but the hateful product manager, can only find their own wayPlease take a look at the picture below, it is easy to test on the Big browser
Background requires picture editing operations: rotation, coding, cropping
On the left is the picture list (the picture address on the server)
Click any picture on the left. Right area display (edit area) picture ready to ed
Upload relevant information about the cropped image, including the relevant coordinates, the size of the picture after cutting
Through the PHP's GD function library to upload the original image and related information to the actual cutting, save
Do not know on the network, such as the various forums, such as avatar settings, how to achieve??
Recently I wrote a picture cutting, in fact, most of
Demand:The width and height of the picture is not fixed, but the outer box has a fixed size.The width of the picture is consistent with the box, and is centered horizontally, that is, trimmed on both sidesThe height of the picture is controlled by the width of the box, scaled, redundant, and trimmed.Original:Code:Effect:The first is the bottom alignment, the top
Mmarkera click events }}When exiting, release the resource:@Overrideprotected voidOnPause () {//Mapview life cycle is synchronized with activity, call Mapview.onpause () when activity hangsMmapview.onpause (); Super. OnPause (); } @Overrideprotected voidOnresume () {//the life cycle of the Mapview is synchronized with the activity and needs to be called mapview.onresume () when activity resumesMmapview.onresume (); Super. Onresume (); } @Overrideprotected voidOnDestroy () {//the life cycl
A pair of 1024*768 size pictures, cropped to 240*240 size, not distorted after cropping, as far as possible to retain the theme meaning of the picture.
The method I used:
1. First the picture and so on to the scale of the size can be cropped;
If it is a wide picture, then the height of the scale to height = 240px, a
Web page to crop pictures, do not need to go through the server.
This is accomplished with the Https://github.com/mailru/FileAPI framework. cooperate with Jcrop.
Advanced browsers use canvas cropping, IE6 7 8 use flash over.
Core code:
var el = $ (' input '). Get (0); Seajs.use ([' Gallery/jcrop/0.9.12/jcrop.css ', ' gallery/jcrop/0.9.12/jcrop.js '], function () {FileAPI.event.on (El, ' Change ', function (evt) {var files = fileapi.getfil
To crop an image upload:The plugins you need to rely on are:[Jquery.photoClip.js] Plug-in[Iscroll-zoom.js] Plug-in[Hammer.js] Plug-in[Lrz.all.bundle.js] Plug-in[Jquery-2.1.3.min.js]On the front-end page, pick: Picture cropping upload plugin--jquery.photoclip.js
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.