You can clone with
Awesome stuff what you did with the code I build. When I saw the face detection I was planning the same. Didn't looked yet really good to the code but you shouldn't include image editor classes.
WP_Image_Editor_GD_Detect_Face needs it's own file and that should be included inside the wp_image_editors filter. See the code for the Gmagick plugin: http://wordpress.org/extend/plugins/gmagick
It was a fairly short file so I didn't bother splitting it out yet, just wanted to get it working! Also
I am already adding the class by using the wp_image_editors filter - see the main plugin class at the top of the file :) Awesome work on that, I was really happy to discover it!
Ideally I should write a plugin that uses the actual openCV extension.
If you have any other tips for improvement I'd love to hear them!
There is always the change of possible breakages.
Currently playing with an image editor in Backbone and was thinking about integrating something like this.
I think a feature like this should be done on user input. If I always upload nature images it doesn't make that much sense.
I absolutely agree. Will see if I can add in a checkbox on the upload dialog that sets an option.
What's the best place to increase the max execution time for image resizing?
WordPress doesn't have a feature for that so set_time_limit(30) would do and in this case it should be inside WP_Image_Editor_GD_Detect_Face ::face_crop()
Fixed this now - sorry I didn't see what you meant at first by not including the main editor files. I have a habit of not putting includes/requires inside functions but in this case obviously it makes sense!
Thanks for the advice and the example :)