Yes, can use either the GD functions or the ImageMagick functions, depending on which is installed on your server and which you prefer.
Using GD it would go something like this:
Edit:
To put the image into your RSS feed you would save it to a file and put the URL into your feed.