I’m working on a web site where the user is “designing” a custom product.
While they are doing this, the background of the div and it’s contents are changing.
At the end of the process the user should have the ability to share their design.
How can I go about doing this?
I’ve thought they could just PrtScn screen-cap and crop to the div, but how can I have the website do this for the user?
Another idea would be to just combine the background, text, and image, all into one PNG. using php, but it seems like whatever I try this way doesn’t work quite right.
Any ideas?
If you’re on Windows, you can use
imagegrabscreento do this.imagegrabscreen: https://www.php.net/imagegrabscreen
Otherwise, your best bet is using something like
paintyto accomplish this:painty: http://www.rabuser.info/painty.php
Now – because you mentioned using e-mail to send these images, I’m going to suggest you simply embed the HTML in the body of your e-mail. Most e-mail clients today will not load images from untrusted domains and may even spam trap you as a result. Some web services base64 encode their images to get around this but if the images are too large (as a divider may be), it’ll exponentially increase your e-mail size, increasing your risk of being spam trapped as well.
Spamtrap: http://en.wikipedia.org/wiki/Spamtrap