Feature proposal #4378
closedImplement client side cropping
Description
This would enable a user generated thumbnail instead of generating it automatically by re-sizing. If disabled behave as it normally would (re-size fullsize). After upload the default crop should be maximum thumbnail sizes from the center of the image. If they visit profile edit they'll see the fullsize which they can adjust the cropping for as needed. Again, if disabled just show normal behavior.
In addition to this implement minimum height/width parameters for images. If the image is below the minimum then reject it with a validation error or upscale depending on new validation parameter value. If no minimum is specified then don't bother checking it.
If thumbnail sizes exceed fullsize sizes then set them to fullsize sizes to avoid any issues.
The minimum and maximum thumbnail width and height should be used for the selector.
Implement 2 new parameters to determine what location displays what version of the image. Example as follows.
Profile Image: Fullsize
Userlist Image: Thumbnail
This would let you select the size displayed at either of the two locations.
Updated by krileon over 10 years ago
Extending "Maintain Aspect Ratio" with a "Yes, Crop" so the image always re-sizes to the specified max width/height except it crops off the excess.
Updated by beat over 10 years ago
- Target version changed from CB 2.0.0 to CB 2.1
Updated by krileon over 9 years ago
Review replacing jCrop (currently unused) with Cropper (http://fengyuanchen.github.io/cropper/) as a better alternative that's more feature complete.
Updated by krileon over 8 years ago
Also review http://www.dropzonejs.com/.
Ideally should create a "cbupload" jQuery plugin to handle the AJAX uploading with support for cropping, preview, drag and drop, etc.. it needs to bridge these other usages to avoid permanent dependency (like my other jquery plugins).
Updated by krileon about 8 years ago
Doesn't need to be ajax uploaded. Use the same methods as the new resize validation rule to convert it to data. It should then display the thumbnail selector to select the coordinates to crop the image to.
This should be a new setting for "Maintain Aspect Ratio". It can probably be "Yes, with User Cropping". It'll work the same as "Yes, with Cropping" except it'll let the user select the cropping instead of just centering it and chopping off the rest. This means this should simply extend the existing resize validation rule.
Updated by krileon about 8 years ago
- Subject changed from Implement jCrop for image fields to Implement client side cropping
- Description updated (diff)
Updated by krileon about 8 years ago
Instead of adding additional minimum parameters the thumbnail size should simply just act as a minimum. It wouldn't make sense for the fullsize to be smaller than the thumbnail so it should upscale.
Edit: n/m we don't need or care about a minimum for this. Resize to the maximum allowed within the aspect ratio of the image then let the user select where the crop will take place. Depending on the image the crop will be vertical or horizontally dragged around.
Updated by krileon about 8 years ago
- Status changed from Assigned to Resolved
- % Done changed from 0 to 100
Implemented in MR !!1125
New parameter value for image fields lets you select "Yes, with User Cropping" for "Maintain Aspect Ratio". Once the image is selected (and valid) if it exceeds the maximum width or height the user is asked to select where to crop it. The upscaling works exactly like "Yes, with Cropping". This means set maximum width and height to 200 for example and you'll always have squared images, but now the user can select the cropping instead of it forced to crop the center.