fixed bug in as.image.character, closes #67