S
S
santavits2018-04-17 00:34:14
PHP
santavits, 2018-04-17 00:34:14

How to save image on server after filtering?

Tell me how after IMG_FILTER_ you can save the photo on the server to the same file.
Here is the code

header("Content-type: image/jpeg"); 
   $uploadfile = 'foto/image.jpg'; //открываем фото
   $source = imagecreatefromjpeg($uploadfile);
   imagefilter($source, IMG_FILTER_NEGATE); //ставим фильтр
   imagejpeg($source); //выводим обработанное фото

Thanks in advance

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question