开发者

PHP Replace Colour in truecolorimage

I need to find a colour w开发者_开发问答ithin an image and replace it - if it is present.

All I can find is information about replacing within an indexed image.

Is there an easy way to do it with a true color image?

Is it more efficient to convert a true color image to an indexed one and then replace the colour?

Thanks,

Mark


Use imagetruecolortopalette to create a palette image, then you can use imagecolorexact to find the index of the color you're looking for and then call imagecolorset to change it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜