Avoid resampling colors in imagecopyresized() and imagecopyr
Posted: Thu Oct 18, 2012 4:11 am
Hi coders!
i'm working around GD function for images. I'm using imagecopyresized() and imagecopyresampled() and i see that the colors of returned image are completly changed. For example, original RGB color was "3c3f70" at position (1,1) and become "656d61" in the output file at the same (i,j) position. I used imagecreatetruecolor() like php.net suggest, but doesn't work.
The original file is just a matrix of colors that i resize in a smaller one which must have the same colors. Is possible to avoid the colors changing in the output file?
Thanks in advantage, hope to solve this issue.
Andrea.
i'm working around GD function for images. I'm using imagecopyresized() and imagecopyresampled() and i see that the colors of returned image are completly changed. For example, original RGB color was "3c3f70" at position (1,1) and become "656d61" in the output file at the same (i,j) position. I used imagecreatetruecolor() like php.net suggest, but doesn't work.
The original file is just a matrix of colors that i resize in a smaller one which must have the same colors. Is possible to avoid the colors changing in the output file?
Thanks in advantage, hope to solve this issue.
Andrea.