Jcrop v0.9.3 Released (added minSize/maxSize)

Jcrop v0.9.3 is released. New and improved with the #1 most-requested feature: bounding minimum and maximum selection sizes.

I really didn’t think I’d get this implemented for a while, but so many people were asking for it, I took a stab at it. Turned out to be a little easier than I thought. I am putting up another update, even though there is still some more work to do.

This update adds two options:

maxSize array [ w,h ] Maximum dimensions
minSize array [ w,h ] Minimum dimensions

Some notes:

  • If you specify a dimension as zero (0), it will not be bounded.
  • If aspectRatio option is set, maxSize and minSize are ignored.

I made a quick demo here.

I’ll fold all this into the documentation soon. I also want to make a more comprehensive feature demo. I felt this bounding thing was a major gap that needed to be filled. (Note: In a future release, these settings should work with aspect ratios too.)

Thanks to those who asked about these missing options it happened a lot faster. It really helps to know what works well and what needs attention. So, leave a comment and let me know!

Tags: ,

11 Responses to “Jcrop v0.9.3 Released (added minSize/maxSize)”

  1. EvanNo Gravatar wrote:

    Again great job! Question, do you think this is stable enough to use on a website just yet?

  2. SEOAdsenseThemesNo Gravatar wrote:

    Nice job! I only found out about jCrop last night from a comment in my blog post. Its good to have another jQuery-based image crop plugin to play around with. I wrote a small WordPress plugin that uses image cropping and I found that functionality in Image Area Select by Michal Wojciechowski. Now that I found jCrop, I’ll try it as well to see which one suits me.

  3. HarryNo Gravatar wrote:

    The simplest way of working around this until it’s added is (assuming you are using ‘jcrop’ as your api var):

    if(c.w < 150)
    jcrop.setSelect([c.x, c.y, (c.x + 150), (c.y + 150)]);

  4. SohailNo Gravatar wrote:

    Hi, Nice once. can you please tell me one thing. I have tried my best but unable to trace the issue. What i want is: I want to fix the size of crop box to w:128, h:70; and disable the new crop box creation.

    only user can drag the initialized crop box.

    Thanks in advance. Please help me out asap.

  5. atholsigmund1168No Gravatar wrote:

    Great information on your blog!

  6. faggolgacallenderNo Gravatar wrote:

    Great information on your blog!

  7. rmonika2990No Gravatar wrote:

    Hi! A Great Post. I was just playing with blogs. i was really excited.

  8. SEOAdsenseThemesNo Gravatar wrote:

    Is my eyes playing tricks on me or the Jcrop manual doesn’t have minSize/maxSize options in it?

    I went straight to reading the manual and api stuff. I was going back and forth the Jcrop manual and thinking to myself, “Oh no, I really need minSize feature”. Until I decided to read the rest of the blog and realise it was implemented in 0.9.3. Phew!

  9. jtrenorwalledlakeNo Gravatar wrote:

    Great information on your blog!

  10. SEOAdsenseThemesNo Gravatar wrote:

    I just can’t wait for aspectRatio to be used simultaneously with minSize/maxSize. So, I’m especially thankful to Harry’s workaround.

  11. msmpersonalNo Gravatar wrote:

    the truth very well, I have only one doubt, there will be some example database? a cut that you see the image through the form stored in a database.
    Thank you!