ruby text processing to create images