stefangabos / Zebra_Image

A single-file lightweight PHP library designed for efficient image manipulation featuring methods for modifying images and applying filters
https://stefangabos.github.io/Zebra_Image/Zebra_Image/Zebra_Image.html
Other
138 stars 51 forks source link

No filter applied #28

Closed Roboxkin closed 1 year ago

Roboxkin commented 1 year ago

Hello! I'm uploading a file to the server and I want filters to be applied to this file, but I can't. Can anyone help me? P.S. I don't speak English and I'm just starting to learn php

`<?php require 'Zebra_Image.php'; //$auto_handle_exif_orientation = true; $my_file = $_FILES['filename']['name']; $uploadfile = basename($_FILES['filename']['name']);

if (move_uploaded_file($_FILES['filename']['tmp_name'], $uploadfile)) { $image = imagecreatefrompng($uploadfile); $image = new Zebra_Image(); $image->apply_filter(array( array('grayscale'), array('emboss'), )); header('content-type: image/png'); //imagepng($image); //imagedestroy($image); echo $image; } else { echo "Error upload file!"; } ?>`