Added error check to lib/private/image.php

This checks that imagecreatetruecolor actually creates an image, rather than returning FALSE.
Without this check, subsequent loop might create billions of ERROR-level log messages.

Signed-off-by: Byron Marohn <combustible@live.com>
Use \OCP\ILogger
Merge pull request #11975 from owncloud/Combustible-combustible_dev

Check imagecreate*() return before using and use logger in \OC_Image