Hi Puneet,
I'm not sure whether SAP is the best place to generate JPEG images. In smartforms for example, you could use a static background image and print some text over it. In adobe forms, you have some other capabilities, but I don't think it is possible to use dynamically generated images in either form technology.
Regards,
Luk