Create image from SQL text

this might be usefull too