tui.image-editor icon indicating copy to clipboard operation
tui.image-editor copied to clipboard

Feature Request: Crop with min width/height and aspect ratio

Open tempurai opened this issue 6 years ago • 7 comments

Hi, thank you so much for this great lib.

However, can you implement crop with min width/height and aspect ratio?

Like we wish to limit user crop at 4:5 ratio with 200px width minimal.

tempurai avatar Feb 02 '19 07:02 tempurai

Anyone working on this?

wvell avatar Feb 11 '19 10:02 wvell

@lincanli It will be good. I'll add this with feature list. But now, some high priority issues must be resolving first.

junghwan-park avatar Feb 13 '19 01:02 junghwan-park

So.. Is it possible to lock the crop ratio?

mikiamit avatar Mar 13 '19 18:03 mikiamit

Hey @junghwan-park , Thanks for really nice and helpful library.

@junghwan-park i want to achieve something like this. When image editor is open i want to initialize direct crop menu. I can achieve this using initMenu: 'crop'. Once this crop is menu will be show,

  1. i don't want to show it's suggestions(I mean crop suggestions like 16:9, 7:5, 3:2, custom). How can i achieve this?
  2. I also want to show custom crop area(or aspect ratio like 5:1 or 2:1 or any others. This aspect ratio will automatically set on image and user can't change it. But user can drag it and set to different part of image. So, once user will click on apply button selected crop area will be automatically croped) by default in editor which i will pass into imageEditor configuration object or after configured some functions like imageEditor.crop(....).

In, short i want to initialize image editor with my custom crop ratio and which will by default set on image, this crop ratio user can't change.

Thanks

AkibDeraiya123 avatar Sep 20 '19 10:09 AkibDeraiya123

thanks AkibDeraiya123 it could be realy cool feature. I'm looking for something like that, any news about it?

daktas avatar Nov 21 '19 14:11 daktas

Hey @daktas , I asked the same question as a new, it's here.

Here is that link (https://github.com/nhn/tui.image-editor/issues/248) and @jinwoo-kim-nhn also replied on it also, but I am also waiting from him about more explanations with the example.

I hope we will get an answer from him very soon. If you found something more interesting and helpful please also update me.

AkibDeraiya123 avatar Nov 22 '19 11:11 AkibDeraiya123

@junghwan-park any progress guyz in this feature?

mason-monu avatar Dec 04 '23 06:12 mason-monu