-
Notifications
You must be signed in to change notification settings - Fork 513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
non-square selections #1
base: master
Are you sure you want to change the base?
Conversation
…ext) in addition to data URI
…est/southeast corner points and width, computing the area center point from those (rather than setting it directly)
…p area arguments back to their original order; small whitespace cleanup
…a single numeric size value
… independently; refactor square to extend rectangle and override its mouse move method; add convenience method for setting selection size by 2 corner points (northwest and southeast)
…ous commit); this can either be a scalar value for square-like selections, an object containing the width/height dimensions, or the string "selection" to use the dimensions of the current selection; fixes bug property setter bug introduced in a1a700f
…ge data when no image is available
…draw flicker by performing this check prior to drawing selection, rather than after
… setting minimum size
… rules are now enforced by the size setter method
…on types, as suggested by @paulflo150 in issue alexk111#6
…ing around the type; improvements to suggestion by @paulflo150 in issue alexk111#6
…od in the crop host class * enforce 1:1 aspect ratio for square-like selections when attemping to drag out of bounds
Introduced aspect ratio parameter for rectangle area
Just curious about this pull request. It would be really helpful. |
I'm planning to use ngImgCrop and allowing selection other than square/circle would be great! |
Sorry for the delayed response.
It shows the crop area, but doesn't allow to get the cropped image (produces that error each time I try to access it). |
@jonny2779 . Thanks for this. Its working great now. I'll look for your pull request however installing from bower was painless. |
I've just been swamped. Should have time soon. Sent from my iPhone
|
Is there any way to configure the rectangle for a fixed ratio This would allow the user to drag the corner but not change the ratio as the relative size changes. Or perhaps the set a fixed dimension like 1500 by 300 and then only allow the user to move the rectangle around without resizing it. thanks |
Currently there is not but I promised another girl I would add it in. New baby. Full time work, contracts on the side... You know how it is 😄 |
Are you referring to maintaining a configured aspect ratio as the rectangle stretches? I suppose the control would perform more like the one for area-type="square" ( resizing maintains aspect ratio) Can you give a rough estimate? Days/weeks/months out? I'm trying to convince product mgmt to go with your latest solution. I can eyeball the rectangle as I stretch it and easily make it work in our app. However since it is possible for someone to completely mess up the aspect ratio, I'm getting some push back. Anyway, I think this is a huge improvement nonetheless. Congrats on the baby! |
@alexk111 Are you still merging PRs? is it worth my time to get this all up to date? IE are you here to merge it in when the time comes? |
@jonny2779 For example, try the attached image. Stretch the cropper to the max. The image gets severely distorted after cropping. |
Hi, are there some news about configuration of the rectangle fixed ratio? |
@jodonnell-broadsoft - I am wondering about the maintenance status of this project as well. Since my current employer depends on it, I would be open for a collaborative fork if this is no longer being maintained. |
@csvan I feel like this is the best option out there. Using my fork and the work of the others in this thread, you should be able to get it going. I'm on skype as jon.c.odonnell if you want to chat more about it. |
However, I feel like this repo is no longer maintained. But not sure. |
I opened an issue about it, for now I will just go through your fork. |
@csvan @jodonnell-broadsoft Amen. We've got production software depending on our fork of this repo. I don't have time to own/maintain a fork at present, but I'd gladly contribute to an actively maintained fork. |
I've moved on from this project, and am now using a custom built directive I rolled for https://github.com/fengyuanchen/cropper. Will work to publish it shortly, but it does non square selections. |
Checkout my fork: https://github.com/CrackerakiUA/ngImgCropFullExtended |
@CrackerakiUA your fork still rendering square results for rectangle crops. |
@hugomn have you checked this codepen? http://codepen.io/Crackeraki/pen/zvWqJM |
@CrackerakiUA yes, this example works. But I need a rectangular area without ratio. In this codepen http://codepen.io/Crackeraki/pen/XmEdPx the result is always square. |
@hugomn ok, i see your point. I have added it as future fix, if you want subscribe on mine fork, i will fix it as soon as possible. |
@CrackerakiUA cool, I'll do. Have you submitted a PR to alex111/ngImgCrop? I thing it's better for us to concentrate efforts here. |
i have. |
Great! @alexk111 any updates on any of PR's being merged? |
@hugomn If you have any other idea that will be useful for this plugin, please tell me. |
@CrackerakiUA -thanks for the fork! |
@evdoks thanks for your testing and bugs report. |
@CrackerakiUA The behaviour with the size of the rectangle being changed when it reaches a bottom/upper/right side of the image is also happening when the |
@evdoks crop area get smaller, is how the fork build and want to be. I will add option to disable that. |
Hi guys. Thanks for this module. This work pretty good. |
@NickBogdanov We're using @CrackerakiUA's fork and I'd recommend it to you or anyone who needs this functionality. |
I've moved on to other stuff since this unfortunately but FWIW I can dig out my branch that includes a number of additional features such as both non-square cropping, aspect ratios, and dynamic resizing for responsive websites. |
@alexk111 For your consideration, I've made some changes to allow for (non-square) rectangular selections (which I plan on implementing soon, along with some tests). This mostly involved moving geometry getters/setters away from being center-point centric. Behavior of current circle and square selections should be identical.
I've also added a property for binding the image data (RGBa pixel array), since we have a need to further process pixels from the crop selection. The alternative would be to externally convert the existing imageURI back into an RGBa pixel array, which we could live with.