Treat image in PHP from php: // input

0

Greetings!

I get the image from php://input through a byte array of the client, where I try to get information such as type, dimensions, etc.

For this I use the code:

$input = file_get_contents('php://input');
$image = imagecreatefromstring($input);

And with exif_imagetype($image) you would get the type, etc. I also try to create other images from it:

$new = imagescale($image, 50, 50);

Apparently imagecreatefromstring is not working for me.

    
asked by Islam Linarez 01.10.2018 в 05:05
source

0 answers