hi,
i'm using the php-gd method setpixel() to set a single pixel on loaded jpg image (loaded from existing file).
the problem is that when i'm do it it's seems like the pixel smeared around the original pixel point and this method not just set the pixels itself.
maybe this occur due to i'm use the method couple of times on the same pixel with the same color so the gd not just replace the pixel but put couple of layers on it and then the result is the smeared area.
i'm a programmer and not understand the graphics depths but it's seems weird that setpixel that should set individual pixel actually effect on more than the pixels itself.
i tried to read about it via Google but seems that most of the examples are for PNG and not dealt with JPGs
do anyone know what i'm talking about and how to solve this issue?
thanks.
Shlomi.
PHP GD - setpixel on jpeg smeared the colors
Moderator: General Moderators
Re: PHP GD - setpixel on jpeg smeared the colors
Are you setting the pixel, then saving it as a JPG? At lower qualities, JPG compression will blur single pixels.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.