Hi,

I decided to install this module in an existing site with thousands of nodes with images which were cropped with the 'Smartcrop' module.

If you happen to flush the image cache for any given style, you will notice that the Focal Point Scale And Crop effect doesn't calculate the initial point for existing images using the Smartcrop module, even if this setting is active.

As a result, ALL images are cropped by means of the default initial point, centred in the image (50, 50).

At this point, the only option for a user would be to manually edit every node/entity an set the focal point for every image.

I think it would make a lot of sense for this module to calculate the default focal point for existing images if the setting is enabled in the backend.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bmunslow created an issue. See original summary.

bmunslow’s picture

Please find attached patch that includes this functionality.

It basically runs _focal_point_guess_default function for images which don't have a focal point set.

bleen’s picture

Status: Active » Needs review

This looks fine to me ... anyone else wanna give it a once over?

bleen’s picture

...for future reference, please make sure you create patches from the root of the module, not the root of your site.

Other than that, this looks good to me so I'm committing.

Thanks!

  • bleen committed d537e0f on 7.x-1.x authored by bmunslow
    Issue #2832030 by bmunslow: Calculate intial focal point for existing...
bleen’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.