process a crop as a resize when possible #201

merged 2 commits into from Apr 7, 2013


None yet
1 participant

Chris--S commented Mar 19, 2013

Currently dokuwiki will generate two cached images when both width & height for an image in the wiki, a 'crop' then a 'resize'. When the aspect ratio of the crop matches the aspect ratio of the source image, it is effectively the equivalent of a resize.

This patches adds a check in the crop function to see if the final image dimensions would match those of a resize and if so, calls resize immediately rather than after the crop, resulting in one cached image.

e.g. source image.jpg 2574px x 1926px
will now both use the same cached image, cache/
rather than the previous three images

Chris--S added a commit that referenced this pull request Apr 7, 2013

Merge pull request #201 from splitbrain/fetchissues
process a crop as a resize when possible

@Chris--S Chris--S merged commit f20dba3 into master Apr 7, 2013

@Chris--S Chris--S deleted the fetchissues branch Apr 7, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment