Giter VIP home page Giter VIP logo

Comments (9)

TimOliver avatar TimOliver commented on May 18, 2024

Hi @anuj77!

Thanks a lot for that! I'm glad you like the look of my library!

Ummm, not at the moment... The cropper lets you choose a specific aspect ratio to clamp to, but no explicit size limiting yet.

That's definitely a good idea though. I'll leave this issue open to remind me to add that at some point.
If you feel up to it, feel free to try adding it yourself!

from tocropviewcontroller.

imack avatar imack commented on May 18, 2024

This is definitely something I could use as well. My biggest issue with PEPhotoCropEditor was a lack of minimum crop support.

from tocropviewcontroller.

TimOliver avatar TimOliver commented on May 18, 2024

Thanks for the feedback!

I'm still swamped, so I've got no time to look into this myself. Feel free to try it yourself and file a PR! :)

from tocropviewcontroller.

harishchopra86 avatar harishchopra86 commented on May 18, 2024

Hey @TimOliver ,
Thanks for the amazing cropping code. Did you got chance to implement the minimum image size limit?
Thanks.

from tocropviewcontroller.

TimOliver avatar TimOliver commented on May 18, 2024

Hi @harishchopra86! Thanks a lot! Glad you're liking it!

Nope, nothing yet sorry! I've been incredibly busy helping my company launch a new thing as of late, so I've only now gotten a chance to start looking at my open source libraries again.

I'm interested in doing this one for the challenge, but there's still a few nitty gritty implementation details to work out:

  • What is required to calculate the minimum size the crop box can be when the user resizes it.
  • What is required to calculate the maximum zoom a user can pinch-in.
  • What happens when the screen rotates.

Honestly, if anyone else wants to try adding it, that would be a huge help. :)

from tocropviewcontroller.

harishchopra86 avatar harishchopra86 commented on May 18, 2024

Hi @TimOliver

I had a look into https://realm.io and it is a revolutionary product. Below are my inline thoughts over the image size implementation points:

What is required to calculate the minimum size the crop box can be when the user resizes it.

  • I think minimising the size of crop box should be allowed until the image's size(height OR width) is greater then the crop box's size. As soon as the image's height OR width reaches cropbox's size then no more resizing should be allowed.

What is required to calculate the maximum zoom a user can pinch-in.

  • Maximum zoom should depend on the quality of the image. While zooming if an image's resolution becomes same as the crop box resolution then zoom should be disabled OR you can provide a constant to set maximum zoom scale.

What happens when the screen rotates.

  • If the screen rotates then image and crop box should get resized but their aspect ratio should remain same.

Regards,
Harish

from tocropviewcontroller.

TimOliver avatar TimOliver commented on May 18, 2024

Thanks @harishchopra86! Glad you like the look of it! :)

Haha yeah, you're right in all of those points; what I was referring to was the actual code logic necessary to enforce those types of constraints. It shouldn't be much code... but it's all math. XD

from tocropviewcontroller.

AnubhaTrantor avatar AnubhaTrantor commented on May 18, 2024

Hi @TimOliver,

I am facing one problem by using this code that is Zoom scale limitation. I want to fix zoom scale because when I zoom my image then it is reduced from actual required image size.

For example :- If I require my image to fit in size 300_450 so I have given crop box with 2:3 aspect ratio and can crop the image in it. But I can keep zooming the image and the zooming is not restricted and at last I get image of very small size like 50_75, etc. So, is there any mechanism by which I can stop image zoom when the image size has reached the minimum size OR Dropbox size. Please advise.

Regards,
Anubha

from tocropviewcontroller.

Faiyyaz avatar Faiyyaz commented on May 18, 2024

Hey tim,

Thanks for such a great library.

Even i want this capping feature of minimum resolution.

Please can you let me know if you will update it soon.

from tocropviewcontroller.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.