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.