51
dfox
7y

I'm a huge fan of the imagecreatefromstring function in PHP. I love how it can just take any image format as a string and turn it into an image!

http://php.net/manual/en/...

Comments
  • 1
    @Letmecode pretty much any time we need to process an image uploaded by a user it's really useful. It's much easier than trying to figure out what format the image is in, and it also allows us to easily verify the image is actually an image and not garbage that can't be displayed as an image.
  • 2
    Can the function detect an image of garbage?

    Lol don't mind my sense of humour ..
Add Comment