Closed (fixed)
Project:
Image Effects
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Nov 2016 at 16:29 UTC
Updated:
27 Mar 2017 at 10:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
woprrr commentedHi, i am interested by this issue because i have already implemented an similar feature in Automated crop project.
The autoCropArea parameter are used to "adjust" the final size of cropBox.
IMHO, that can be an simple / powerfull option to add in other Effects in option by example 'Scale & crop' 'Automated Crop' 'Resize'.
Comment #3
sam152 commentedNeeded this, here is the plugin.
Comment #4
sam152 commentedComment #5
mondrakeThanks @Sam152
As a reference for entering a new effect in a single commit, see http://cgit.drupalcode.org/image_effects/commit/?id=7e79819
Comment #6
sam152 commentedAt this stage, I don't have capacity to implement the changes requested, given #3 works for my use case.
If anyone would like to push this forward, please feel free to implement changes in #5.
Comment #7
woprrr commented@mondrake, Have you already seen automated_crop ? I think in this module we have an effect similar to what you describe. Eg : possibility to enter height/width and/or percents. If that can be usefull here I can purpose a patch to delete it to automated_crop and based this effects onto image_effect (why not).
Comment #8
mondrake@woprrr thanks, I had a quick glance - it looks like the automated_crop effect has a very specific use case and it introduces a specific service to manage the crop. That said, if it can be 'extracted' and be able to work in isolation (i.e. without needing that module as a dependency), and fits in the concept here (i.e. just resizing/scaling the source image to a percentage), then as you say, why not?
If you just consider moving the automated_crop effect to the module here, then fine as well, but that would be a separate issue IMHO.
If you want to take it on, please mind the naming conventions and the testing approach described in #5. It can be a bit painful, but please consider we are trying to establish a common pattern for introducing any new effect to this module.
Comment #9
mondrakeTaking it on
Comment #10
mondrakeHere's a new patch, addressing points in #5.
Comment #12
mondrakeCommitted.