write the conversation from MAt to QImage

the test for registerhelper still crashes but i can not change it