Is there a standard feature in php for image discoloration and automatic saving to a folder?

The fact is that at least I have not found a 100% cross-browser solution and maybe php has it?

I saw a huge pile of such solutions but they did not work in IE and also in EDGE and also in Midori and this topic already got me, I lost a lot of orders because of this.

Customers gave the order to other performers and they did to them but not cross-browser - as if it were not ice,.

    1 answer 1

    You can read more here .

    <?php $source_file = "test_image.jpg"; $im = ImageCreateFromJpeg($source_file); $imgw = imagesx($im); $imgh = imagesy($im); for ($i=0; $i<$imgw; $i++) { for ($j=0; $j<$imgh; $j++) { $rgb = ImageColorAt($im, $i, $j); $rr = ($rgb >> 16) & 0xFF; $gg = ($rgb >> 8) & 0xFF; $bb = $rgb & 0xFF; $g = round(($rr + $gg + $bb) / 3); $val = imagecolorallocate($im, $g, $g, $g); imagesetpixel ($im, $i, $j, $val); } } header('Content-type: image/jpeg'); imagejpeg($im); ?> 
    • looked and checked in all browsers - Greate! - user33274