Hi all,
First post here, so I am not sure I am in the right forum. But let's go, it's a code contribution ;)
I use a lot of flexinodes, and don't want to use Fleximax to be able to use the full power of PHPTemplate. However, the image field in the Flexinode has a big drawback: it doesn't resize images. You can choose a max widthxheight, but in fact, the Flexinode will refuse the upload if the image is bigger. Very confusing for users, who often don;t know how to rescale an image on their computer.
The Fleximax seem to resize images, but is yet to be cleaned out apparently (http://drupal.org/node/30376).
And I don't understand how this thread answers the question: http://drupal.org/node/42399
Anyway, the fix is simple. Just edit field_image.inc, and instead of
return t('The uploaded image is too large; the maximum dimensions are %nxn pixels.', array('%nxn' => $field->options[1]));
put:
<?php
$_imagick_convert = variable_get('flexinode_convert_path', '/usr/local/bin/convert');
$filter = ' -filter QUADRATIC -scale '. $field->options[1];
$path = $file->filepath;
$name = $file->filename;
$path_only = str_replace($name, '', $path);
$name_alt = 'alt_'. $name;
$path_alt = $path_only . $name_alt;
exec("$_imagick_convert $filter $path $path_alt");