imported from https://projects.developer.nokia.com/imagelib