fix image conversion functions, add test
numpy 1.6 compatibility fix
Merge branch 'qimage_fixes_2'