Wrote something about how to manipulate images at runtime from a UI5 (web) application with the help of Promises. And canvas, of course.
http://scn.sap.com/community/developer-center/front-end/blog/2016/01/06/dynamic-image-manipulation-with-ui5-and-promises
Sample code over at GitHub: https://github.com/vobujs/UI5_img_manipulation_Promises