By neoliminal on
I have tracked down the problem to this function:
/**
* Generate image derivatives.
*/
function _image_build_derivatives(&$node, $temp = FALSE) {
// sanity check:
if (!_image_check_settings()) {
return false;
}
$info = image_get_info(file_create_path($node->images['_original']));
$sizes = _image_get_sizes();
if (!$temp) {
_image_remove($node);
}
foreach ($sizes as $size) {
if ($size['label'] && $size['width'] && $size['height']) {
if ($info['width'] > $size['width'] || $info['height'] > $size['height']) {
$source = file_create_path($node->images['_original']);
$destination = _image_filename(basename($source), $size['label'], $temp);
if (!image_scale($source, file_create_path($destination), $size['width'], $size['height'])) {
drupal_set_message(t('Unable to create %label image', array('%label' => $size['label'])), 'erro$
}
else {
$node->images[$size['label']] = $destination;
if (!$temp) {
_image_insert($node, $size['label'], file_create_path($destination));
}
}
}
else {
$node->images[$size['label']] = $node->images['_original'];
}
}
}
}
And in particular this line:
if (!image_scale($source, file_create_path($destination), $size['width'], $size['height'])) {
drupal_set_message(t('Unable to create %label image', array('%label' => $size['label'])), 'erro$
}
I can't, for the life of me, find any function called image_scale(), but it's clearly failing.
Does anyone know where this function lives?
I'm trying to prove to my boss that we can use this NOW, but I need to get the preview up and running today.
Comments
I forget where the function
I forget where the function is, but it ends up calling the convert function in /includes/image.imagemagick.inc.
I had the same problem, and tracked it down to the lines:
in /includes/image.imagemagick.inc
For some reason, it was getting a blank value. I set it in the database, but still it did not work.
I just changed it manually to:
This is not a good solution, but it'll make it work for now....