Automatically Trim Image if Transparent Edges (like ImageMagick)

Is there a command in Kodi or python addon libraries that does the equivalent of ImageMagick’s trim command?
eg
“c:\Program Files\ImageMagick-7.0.2-Q8\magick.exe” mogrify -trim +repage -resize 176×45 -path Logos *.png

I’m trying to remove the transparent edges from TheLogoDB.com channel logos within Kodi.

With Trim:
[Image: MzvWvZF.png]

Without Trim:
[Image: rqvj985.png]