Hi @sven-abx
There is a recent very nice solution to your question posted by @gab1one which is dealing with cutting off black edges :
Hope this is of help
Best regards
Ael