Thumbs failing on Imagemagick < v6.3.8-3

I’ve run into a problem where my host is running a version of imagemagick pre 6.3.8 and won’t upgrade. Prior to this version IM did not support the ^ operator in the -resize command (widthxheight^ = Minimum values of width and height given, aspect ratio preserved.) Consequently using the thumb function kept failing for my site. Also I prefer IM over GD as the image quality seems much better to me.

Modifying kirby/toolit/lib/thumb.php I inserted an if statement into the IM function (about line 300) to comment out the line

"$command[] = $thumb->options['width'] . 'x' . $thumb->options['height'] . '^';" 

and use either

-resize width   //Width given, height automagically selected to preserve aspect ratio.


-resize xheight   //Height given, width automagically selected to preserve aspect ratio.

depending whether the image is landscape or portrait and this works fine…

BUT – is there a way to do this with a file saved in the site folder so I don’t loose this modification when updating the kirby core ? or a better/different approach?

thanks, Duncan.