Reputation: 941
I'm using a API to get some photos from a famous web. And I want to take that pictures and change them to black&white, to re-display in my web but with the colors changed. Is there any possibility to do it without having to store the images on the disk?
THanks. Sorry for my English.
Upvotes: 0
Views: 181
Reputation: 25564
example from https://www.php.net/manual/en/function.imagefilter.php
<?php
$im = imagecreatefrompng('yourfile.png');
if($im && imagefilter($im, IMG_FILTER_GRAYSCALE ))
{
echo 'Image brightness changed.';
imagepng($im, 'sean.png');
imagedestroy($im);
}
else
{
echo 'Image brightness change failed.';
}
?>
Upvotes: 1
Reputation: 339816
Sure, it's possible, but don't do it, it'll almost certainly be a breach of the terms of use of that site.
Upvotes: 0