Add option to stop up sizing during crops,
globetrotter - February 1, 2009 - 13:11
| Project: | ImageCache |
| Version: | 6.x-2.x-dev |
| Component: | imagecache_image module |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
The crop implementation crops an image regardless if there is really something to crop. I think it would make more sense to crop only if the image is actually bigger than the cropping area.
If I want to crop all images to a max height of 100px I don't want images with 50px height to be enlarged to 100px by inserting a transparent part. That's how it works today and it doesn't really make sense like that.

#1
I have the same issue. I have the occasional image that is less than my desired final image size and in those cases I just want that image to be unchanged. Using 'scale and crop' a small image gets upsized. Using 'depricated scale (outside)' then 'crop' puts a black background around it to bring it up to the crop size. This is no good as I then process it further with imagecache_actions. Is there a way to only crop if required? Tested with both beta 8 and latest dev.
#2
well i think there's clearly a use for it. if you want to get a larger canvas you'd use the crop function to do so. that said adding an "allow upcropping" option (similar to the allow upscaling option) would be helpful for cases like yours where you don't want that behavior.
#3
I change that back to bug report because from the editorial point of view it is a bug that pictures that don't have enough sizes to be cropped are cropped.
The behaviour that is expected here is that images with smaller size are not upscaled. I don''t think there is at least one case that anybody wants to have upscaling...
thanks a lot
#4
Anyone find a solution to this?
#5
subscribing
#6
I resolved this by hacking the module. Not a clean fix, as I haven't added an "upscale" toggle in admin, but I disabled all "upcrops".