Bugfixes in image drawing routine, removed inline until further testing fixes bugs with it

Signed-off-by: bergerkiller <bergerkiller@gmail.com>