how to convert txt file as jpg

Is there an easy way to convert a text (txt) file into an image (jpg) file? I tried image events but couldn’t make it work. I don’t think image events can open a txt file. Graphic Converter couldn’t either. My only thought is to open the text file, save it as a pdf using the print dialog, and then convert the pdf to jpg… but that seems like too much work. Any ideas???

Can you open the text file in Text Editor, capture the window as a png and then convert to jpg?

My inclination would be to print the text doc as pdf, then convert that to jpeg. Graphic Converter can do that, I’ve done it.

Actually I can work with a png file as easily as a jpg file for the final image. So it seems at this point my only real choice is to use TextEdit to convert the text file into an image file first… by either printing as pdf or a window capture to png. I’m not sure how easy it is to applescript a window capture so I need to check on this further.

But I’m still hoping someone has an easier way… like maybe some unix function that I’m not aware of.