angularjs - how to crop-area with different height/width size? with ngImgCrop -



angularjs - how to crop-area with different height/width size? with ngImgCrop -

i'm trying crop not same height/width crop-area can utilize rectangle crop-area.

<div>select image file: <input type="file" id="fileinput" /></div> <div class="croparea"> <img-crop image="myimage" result-image="mycroppedimage" area-type="square" area-min-size="20" result-image-size="150"></img-crop> </div> <div>cropped image:</div> <div><img ng-src="{{mycroppedimage}}" /></div>

i need set height/width area-min-size="{100, 150}" result-image-size="{100, 150}"

as far can see - not possible, involves more complex manipulation of selector area (e.g., need resize in 2 dimensions independently).

there alternative however. though might not much of eye candy ngimgcrop, achieves need. [ http://grab.by/cbpq ]

it called: angular-image-crop.

here jsbin sample.

you may need play around next parameters data-width="", data-height="", dat-shape="square" before result satisfying:

<image-crop data-width="500" data-height="300" data-shape="square" data-step="imagecropstep" data-result="imagecropresult" ng-show="showimagecropper" ></image-crop>

angularjs

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -