How to generate dynamic image previews

So I’m not sure if this is beginner or more advanced but what I’m trying to do is have a default blank image that i can allow users to add an image and some text to dynamically like a preview, like what apple or dell do when you engrave your device and it shows you what it’s going to look like before you order it.

i’ve done some google searching and i’m not exactly sure what to search for, i did find something about imagecreate but i don’t know enough about php and the only thing i could do is generate some lame text and thats about it

i need the image to be constrained to a certain area as well as the text, and the text needs to be centered and automatically go to the next line when full and/or change the the font size to fit within those constraints.

i’m hoping that there is something that is pre-built or open sourced that comes close to my needs that i can modify to fit my needs because though i am newer to PHP i’m not new to programming and i can look at a working example and figure out how and why it works the way it does and modify it to make it work the say i need.

it doesn’t even have to be in php i just figure that php was the popular web language so something would probably be available.

thank you,

This should be done in javascript. As PHP is a server side language you would have to refresh the browser window for every change to display to the user.

I would try to find a plugin with searching for something like
jquery image text overlay preview

Sponsor our Newsletter | Privacy Policy | Terms of Service