Trim image thumbs

On a site we show movie stills. Some of the images have black bars because they don’t fit the default 16:9 ratio. Now I’ve found out that Imagick and GD offer methods to trim this excess colour, Imagick::trimImage and imagecropauto.

Is there a way to tell Kirby to apply these methods when generating thumbs?

You would need a custom thumb driver that implements those methods.

Sounds easy but I have no idea how to create that.