I had a scale and crop image style created, but I had to move it to code. So, to re-create it, my code is:
function mymodule_image_default_styles() {
$styles = array();
$styles['mymodule_thumb'] = array(
'label' => 'MyModule Thumbnail',
'effects' => array(
array(
'name' => 'image_scale_and_crop',
'data' => array(
'width' => 210,
'height' => 210
),
)
),
'name' => 'mymodule_thumb',
'storage' => IMAGE_STORAGE_NORMAL
);
return $styles;
}
It's scaling to the 210px width, but it doesn't seem to be cropping right.
Am I missing something? Before this, I tried separate scale and crop effects, but got the same result.
EDIT: If it matters, I'm calling image_style_url() and passing the style.
hook_image_default_styles
code it generated in thefeaturename.features.inc
file into your own module. And then delete that dummy feature. But see my answer below if you want to have a manual stab at it.