responsive_breakpoints_generator icon indicating copy to clipboard operation
responsive_breakpoints_generator copied to clipboard

Aspect ratio crops off-center

Open skube opened this issue 8 years ago • 3 comments

It seems to me when I try to use the Art Direction functionality, with any ratio other than 1:1 the cropping is a off center by a noticeable amount. ~~Is this on purpose?~~ Is there a way to override?

Edit: After some further reading, it appears this is by design. The algorithms are doing intelligent image cropping. I'm still wondering if there is a way to optionally override so images are always cropped to the center.

skube avatar Jul 07 '17 11:07 skube

Hi, @skube. Can you please provide a couple of URL examples where the image is badly cropped, as you describe, so we can better understand the issue?

roeeba avatar Jul 18 '17 13:07 roeeba

I can provide an image but I don't think it's necessary. As I understand it, your Art Direction option trys to algorithmically determine the best area to crop in on. If I wanted to simply force the crop to occur on the exact center of the image - regardless of the content - what would be the best way to do that?

skube avatar Jul 18 '17 16:07 skube

Hi, @skube. The art direction in the tool involves 2 parameters: aspect ratio and percent of the screen in each device resolution (e.g., 4:3 ratio image taking 30% of the screen on mobile devices). A ratio that is different from the original image will indeed involve cropping. We use c_fill for cropping with g_auto for making sure that the relevant part is included in the image. While the tool itself doesn't support g_center instead of g_auto, you can try and use the API directly for this. Adding this ability to the tool is part of our future roadmap. We'll update here if and when this will be available.

roeeba avatar Jul 20 '17 12:07 roeeba