is it possible to create images (.jpg) with php?

for example, I would like to create an image with a text on the top, a small image at the rigth, and a blue line at the bottom.
can I change the size of that image?

is it possible to do things like that with php?

thanks very much for your help