浏览代码

Update textures.c

pull/1271/head
raysan5 5 年前
父节点
当前提交
87592e2625
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. +4
    -4
      src/textures.c

+ 4
- 4
src/textures.c 查看文件

@ -1111,12 +1111,12 @@ void ImageAlphaClear(Image *image, Color color, float threshold)
for (int i = 0; i < image->width*image->height; i++) if (pixels[i].a <= (unsigned char)(threshold*255.0f)) pixels[i] = color;
RL_FREE(image->data);
int prevFormat = image->format;
int format = image->format;
image->data = pixels;
image->format = UNCOMPRESSED_R8G8B8A8;
ImageFormat(image, prevFormat);
ImageFormat(image, format);
}
// Apply alpha mask to image
@ -1189,11 +1189,11 @@ void ImageAlphaPremultiply(Image *image)
RL_FREE(image->data);
int prevFormat = image->format;
int format = image->format;
image->data = pixels;
image->format = UNCOMPRESSED_R8G8B8A8;
ImageFormat(image, prevFormat);
ImageFormat(image, format);
}
// Resize and image to new size

正在加载...
取消
保存