This package allows you to draw the four corners of a shape that can then be taken through for cropping using your preferred [front or back-end] method.
The tool presents a given image and four points that can then be moved to represent the new crop points.
The result will be a series of coordinates that can be used with your chosen crop utility, e.g. open-js, imagick, etc.
The cropper UI, once triggered will show an overlay to present the image as large as possible without zooming, some red corner points, and some buttons including Save
Cropping is expected to be applied outside of this tool and is triggered through a callback from the tool to your given function (which is expected to have three arguments = (srcImg, maskTypeCd, csv)
where the csv
is a comma separated list of values starting with :
scaled crop width
andscaled crop height
,followed by the x
scaled-top-left-xy-point
,scaled-top-right-xy-point
,scaled-bottom-right-xy-point
,scaled-bottom-left-xy-point
).Mouse & Touch capable (as of release 1.0)
Implementation is simple:
html
javascript
Also see
articles/Implementing-a-Monaco-Editorsquarearticles/iConnectionTestsquarearticles/imagick-fiddlesquarearticles/javascript-camerasquarearticles/list-editsquarearticles/minifierssquarearticles/opayosquarearticles/table-drag-sortersquarearticles/typewatchsquareprojects/MFCalendarPopupsquareprojects/MFChartColumnsquareprojects/MFColorPickersquareprojects/MFColorPickerBasicsquareprojects/MFColumnDataBarsquareprojects/MFColumnGradientsquareprojects/MFCropCornerUIsquareprojects/MFFloatawayMsgsquareprojects/MFPanelssquareprojects/MFSelectorsquareprojects/MFShowConsolesquare