Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在将多个小图像合并成一个矩形马赛克。
当处理少量源图像时,结果很好:
但是当处理大量来源时,会产生类似棕褐色的效果:
我应该使用任何技术来保存颜色吗?
我合并图像的方法本质上是运行一个脚本,该脚本循环遍历源图像,imagecreatefromjpeg()用于抓取它,然后将源图像imagecopy()合并到集体目标图像上(并运行直到所有图像都被添加/放置)。
imagecreatefromjpeg()
imagecopy()
我没有使用 imagecreate() 作为起点,而是改为 imagecreatetruecolor() 并且它解决了颜色丢失问题。