php - Duplicate a image variable GD library -


What is the easiest way to duplicate an image variable in PHP

Normally you just < Code> $ veronne = $ varold .

But with the GD library variable if I have mentioned above and then edited $ variant then $ varold will also be affected.

Obviously, there must be a way to reopen the file or to create a new image and copy it into it. Is there any easy way?

Your attempt is not working to handle GD image (a memory pointer) both $ Varnew and $ varold will also store the same pointer, thus pointing to the exact image in memory. You will have to use the image again or maybe worse than the file.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -