jonom / silverstripe-focuspoint

Module for improving automatic image cropping in SilverStripe. Adds simple art-direction control by allowing you to set and crop from a focus point instead of the centre point of an image.
MIT License
109 stars 48 forks source link

Reduce filesystem reads where possible (closes #64) #73

Closed kinglozzer closed 4 years ago

kinglozzer commented 4 years ago

Closes https://github.com/jonom/silverstripe-focuspoint/issues/64

jonom commented 4 years ago

Thanks Loz!

jonom commented 4 years ago

Hmm I got a broken test. My tests seem to run after merging 😅 clearly not experienced with Travis. https://travis-ci.org/jonom/silverstripe-focuspoint/builds/624827347

jonom commented 4 years ago

@kinglozzer I might have to revert this. The focuspoint coordinates are supposed to be adjusted after cropping so that the focuspoint sits on the same part of the image as it did before. The use case for this is that you can use the focus point in the front-end (e.g. to position a background image on a container with a different aspect ratio). I played around for a bit to try and restore this functionality but haven't had any luck. I'm a bit rusty on image manipulations now!

kinglozzer commented 4 years ago

Oh poo... I’ll have a think about how to fix that 😅

tractorcow commented 3 years ago

I've run into this issue, and I need a fix, so I'll pick up where you left off @kinglozzer :D

tractorcow commented 3 years ago

I did a brief review; I can see the issue in the code and have an idea for how more appropriately to resolve them. :)