What is the easiest way to duplicate an image variable in PHP.
Normally you can simply do $varnew = $varold
.
But with a GD library variable if I did the above and then edited $varnew then $varold would be effected too.
Obviously one way would be to reopen the file or to make a new image and copy it into it. Is there an easier way?