By default, Drupal prints out a notification message that images exceeding the maximum dimensions were resized. I want to disable this message.
The relevant line is located in file_validate_image_resolution():
drupal_set_message(t('The image was resized to fit within the maximum allowed dimensions of %dimensions pixels.', array('%dimensions' => $maximum_dimensions)));
Obviously, the quick way to do this is to put two little slashes right before the line. But I am trying to do this without hacking core. I copied the entire function into
MYMODULE_file_validate_image_resolution(), then commented the lines out, but this had no effect. What's the right way to do this?