Duplicate a image varible GD library

Posted by Jigs on Stack Overflow See other posts from Stack Overflow or by Jigs
Published on 2010-06-15T18:15:41Z Indexed on 2010/06/15 18:22 UTC
Read the original article Hit count: 241

Filed under:
|

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?

© Stack Overflow or respective owner

Related posts about php

Related posts about gd