Hello,
I am an engineer who have already work with canvas technologies (which will enable to do what you ask). I can do this for tomorrow if you want.
To better help you, I would need additional informations :
- for the translate by 40px : what should happen ? we translate in the right, cutting the right part and filling the left part with black ? or just cutting the image and changing its dimension ?
- I don't understand the content of the attached document : what is it ?
Please send me a message if you want to work with me.
Best regards.