advanced-cropper / vue-advanced-cropper

The advanced vue cropper library that gives you opportunity to create your own croppers suited for any website design
https://advanced-cropper.github.io/vue-advanced-cropper/
Other
933 stars 130 forks source link

Looking for a way to use a mix of image type restrictions #123

Closed xariusdesai closed 3 years ago

xariusdesai commented 3 years ago

Hi,

So I'm trying to get a functionality akin to this:

I want the image to be constrained to the cropper as in fit-area (ie. I can zoom in as much as I want, but can only zoom out as much as the max image height / width)

but I want to be able to use the crop itself like the image restriction is none (ie. I can add transparent areas to my crop).

Screenshot 2021-03-24 at 14 51 47

My use case is that I want to create some square images from some rectangular ones, and sometimes I'll need the whole height/width so what I'm actually looking to do is pad the image into a square one.

Is there a way to currently do this?

Thanks

Norserium commented 3 years ago

@xariusdesai, hello! In other words, you want to get the behavior like image-restriction: none but without the possibility to make an image smaller than a visible area?

xariusdesai commented 3 years ago

@Norserium thats exactly what I'm looking to do. Is it possible to do currently?

Norserium commented 3 years ago

@xariusdesai, I assume it's possible. Try this example.

xariusdesai commented 3 years ago

@Norserium thanks for that, I need to make some tweaks depending on my use case but its got me most of the way there!

Norserium commented 3 years ago

@xariusdesai, you are welcome!