在Spine中打包的纹理图集页(.png图像文件)不仅仅是将多个图像打包成一个图像,而且还对透明像素进行了处理。如何处理取决于纹理打包器的输出部分的设置。:
The texture atlas page (.png image file) packed in Spine is not just packed multiple images into a single image, but also processed for transparent pixels. How processed depends on the settings in the output section of the texture packer:
纹理打包 - Spine用户指南: 输出
例如,如果启用 预乘Alpha
的默认设置,像素的RGB值会乘以alpha值。因此,完全透明的像素将是完全黑色的。如果你想知道透明像素的颜色,在GIMP中打开图像,这是一个免费的开源图像编辑器,并隐藏阿尔法通道。
For example, if the default setting of Premultiplied alpha
is enabled, the RGB values of the pixels are multiplied by the alpha value. As a result, completely transparent pixels will be completely black. If you want to know the color of transparent pixels, open the image in GIMP, a free and open source image editor and hide the alpha channel.
如果你想知道更具体的解决方案,如果你向我们展示你使用什么代码来打包图片,我们也许能给你建议。
If you want to know more specific solutions, we might be able to advise you if you show us what code you are using to pack the images.