Hi people! I got up again, I can not move.
The task is to take a PNG image in which there are transparent, translucent, and non-transparent pixels, and replace all opaque pixels with black, and replace all semi-transparent pixels with black, but at the same time, keep it translucent.
Here is the beginning of the code:
$im = imagecreatefrompng('img/1.png'); (yes, yes, then it is necessary to begin to discolour further, and with this line I am already oochen with a lot of faith)
Please help!
There are ideas to do this in two cycles, and walk through each pixel, but I can’t collect all my thoughts and knowledge about the functions of the GD library.