JQuery Jcrop image cropping tool learning, jquery. jcrop. js

Source: Internet
Author: User

JQuery Jcrop image cropping tool learning, jquery. jcrop. js

Options parameter description:

Name Default Value Description
AllowSelect
True
Allow new selection box
AllowMove
True
Allow box selection to move
AllowResize
True
Allow box selection Scaling
TrackDocument
True

BaseClass
"Jcrop"
Prefix of the basic style name. Note: class = "jcrop-holder", only the jcrop is changed.
AddClass
Null
Add a style. For example, if the value is "test", the style is added to class = "test jcrop-holder"
BgColor
"Black"
Background color. Color keywords, HEX, and RGB.
BgOpacity
0.6
Background transparency
BgFade
False
Use background transition effect
BorderOpacity
0.4
Border transparency
HandleOpacity
0.5
Zoom button transparency
HandleSize
9
Zoom button size
HandleOffset
5
The distance between the zoom button and the border
AspectRatio
0
Select the aspect ratio of the box. Description: width/height
KeySupport
True
Supports keyboard control. Buttons: top, bottom, left, and right (MOVE), Esc (cancel), and Tab (jump out of the cropping box and go to the next one)
CornerHandles
True
Allows corner Scaling
SideHandles
True
Allows four-sided Scaling
DrawBorders
True
Draw borders
DragEdges
True
Drag border allowed
FixedSupport
True

TouchSupport
Null

BoxWidth
0
Canvas width
BoxHeight
0
Canvas height
Boundary
2
Boundary. Note: You can drag the mouse from the border to select the cropping area.
FadeTime
400
Time of over-Effect
AnimationDelay
20
Animation Delay
SwingSpeed
3
Transition speed
MinSelect
[0, 0]
Select the minimum size of the box. Note: If the selection box is smaller than this size, the selection is automatically canceled.
MaxSize
[0, 0]
Maximum size of the selected box
MinSize
[0, 0]
Minimum Size of the selected box
OnChange
Function (){}
Select the event when the box is changed
OnSelect
Function (){}
Select the scheduled event from the context menu.
OnRelease
Function (){}
Events when the checkbox is canceled

API:

Name Description
SetImage (string) Set (or change) the image. Example: jcrop_api.setImage ("newpic.jpg ")
SetOptions (object) Set (or change) parameters. The format is the same as that set during initialization.
SetSelect (array) Create a selection box. The parameter format is [x, y, x2, y2].
AnimateTo (array) Create a selection box with an animation effect. The parameter format is [x, y, x2, y2].
Release () Unselect
Disable () Disable Jcrop. Note: existing selection boxes are not cleared.
Enable () Enable Jcrop
Destroy () Remove Jcrop
TellSelect () Obtain the value of the selected box (actual size ). Example: console. log (jcrop_api.tellSelect ())
TellScaled () Obtain the value (ui size) of the selected box ). Example: console. log (jcrop_api.tellScaled ())
GetBounds () Obtain the actual image size in the format of [w, h]
GetWidgetSize () Obtains the image display size in the format of [w, h].
GetScaleFactor () Obtains the scaling ratio of an image in the format of [w, h].
Http://deepliquid.com/content/Jcrop.html

Download resources at 0 Points]


Which of the following are examples of jquery's refreshing image uploading, cropping, and saving? jquery. jcrop image cropping (strong)
Http://deepliquid.com/content/Jcrop.html
Http://www.jb51.net/article/18273.htm
How does the jcrop image cropping plug-in set the selection region based on the input value? Php itself has a cropping image function. js intercepts the image and obtains several coordinates for the function as a parameter. php images are uploaded to the temporary space of the server. The images are cropped and saved as needed by programmers.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.