Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The default cropping (when the user didnt crop the image) should be the same lake "scale and crop" of the default drupal image style.
Currently when the user didnt crop an image its kind of horrible, and therefor the module is unusable:
Example 1: Square-Images get zoomed in alot
Drupal default scale and crop:
Epsa crop:
Example 2: Different dimensions result in black bars
Drupal default scale and crop:
Epsa crop:
Comment | File | Size | Author |
---|---|---|---|
wide2.jpg | 53.99 KB | MickL | |
wide1.jpg | 67.89 KB | MickL | |
square1.jpg | 53.14 KB | MickL | |
square2.jpg | 45.72 KB | MickL |
Comments
Comment #2
hyside CreditAttribution: hyside as a volunteer commentedExample 1: Square-Images get zoomed in alot
The zoom is dependent on resolution of the source image. If you upload a very high resolution image, the default crop of that image will be "zoomed in alot". Your image style likely has defined dimensions, and it is merely grabbing those pixel dimensions from the middle (or sides/top/bottom) of the source image. I agree that there could be a configuration checkbox (or something) to choose to "scale and crop" rather than "zoom and crop" by default, but I'm not sure the zoom option is bad in all situations, so I would not suggest removing that option entirely as a default.
Example 2: Different dimensions result in black bars
This second example only occurs when the source image is smaller than the defined pixel dimensions of the cropped image style. Epsacrop doesn't want to "Res-Up" the source image to meet the dimensions defined by the image style, so it "fills" the space that the source image is "short" with the selected background color (by default, black). You can get around this issue by setting minimum file dimensions in your image field (or file:image) that meet or exceed your largest image style requirements. Of course, you can "force" epsacrop to "Res-Up" your image from a smaller source, but the results are mostly terrible, so I agree with the "black bar" approach on this second example.
Comment #3
Chris CharltonI'm experiencing this issue. Not sure if comment #2 is an explanation as a workaround, or just a note. Filling maximum area is something I'd like to see working.