Implement Aspect Ratio from Jcrop

Several times now, I've wished that I could crop my image to a specified aspect ratio. For example, I need my "formal pictures" to all be a specific aspect ratio, but I want to keep the highest pixel size I can.

I've gone ahead and implemented this in filter-crop-image.php using Jcrop's included aspect ratio options. I would be happy to submit this to Trac, but I've forgotten my Trac username and password.

Comments

  • acrylian Administrator, Developer
    I am not sure I understand. The image crop feature actually uses the sizes set on the images option so it would be that aspect ratio.

    If you forgot your trac account you of course will have to register again.
  • I've gone ahead and created a new trac account and filed Ticket #1737 for this.

    You probably don't need this primer, but here: Think about thumbnails. Thumbnails are sized at 100px x 100px. That makes their aspect ratio 1:1 (or just 1).

    Currently, the crop feature in Zenphoto gives you free reign to crop any which way you want. This is good sometimes. It allows you to crop out a single person or take out the top or bottom. But, the final resolution could end up being just about anything.

    Many times when I'm cropping an image, I'm looking to do something similar to a thumbnail. For example, I like the images for my website to be 450px x 300px - or an aspect ratio of 1.5:1 (or just 1.5). I can guess at what this is using filter_crop-image, but that's pretty difficult. It is easier to lock the selection box to the desired aspect ratio.

    Jcrop definitely supports this, so it's rather easy to implement.

    If you're still unsure, just try out my filter-crop_image enhancement and you'll see how it can be beneficial.
Sign In or Register to comment.