aboutsummaryrefslogtreecommitdiff
path: root/src/textures.c
diff options
context:
space:
mode:
authorRay <raysan5@gmail.com>2018-06-20 00:52:14 +0200
committerRay <raysan5@gmail.com>2018-06-20 00:52:14 +0200
commit75ba5aca551d2b16fa75ba31e616b009ac5dde6a (patch)
tree9e2b3d03856958d81ba07161d5c0d0a7e869000f /src/textures.c
parent372e4a1139f8ac4b5e1220771447f1220104b112 (diff)
downloadraylib-75ba5aca551d2b16fa75ba31e616b009ac5dde6a.tar.gz
raylib-75ba5aca551d2b16fa75ba31e616b009ac5dde6a.zip
Improved font generation and SDF
Added: data to CharInfo struct Added: LoadFontData() Added: GenImageFontAtlas() Removed: LoadFontEx() Removed: LoadTTF() [internal] Some code tweaks
Diffstat (limited to 'src/textures.c')
-rw-r--r--src/textures.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/textures.c b/src/textures.c
index eeaf7ffd..29316a7a 100644
--- a/src/textures.c
+++ b/src/textures.c
@@ -828,9 +828,9 @@ void ImageFormat(Image *image, int newFormat)
} break;
case UNCOMPRESSED_GRAY_ALPHA:
{
- image->data = (unsigned char *)malloc(image->width*image->height*2*sizeof(unsigned char));
+ image->data = (unsigned char *)malloc(image->width*image->height*2*sizeof(unsigned char));
- for (int i = 0; i < image->width*image->height*2; i += 2, k++)
+ for (int i = 0; i < image->width*image->height*2; i += 2, k++)
{
((unsigned char *)image->data)[i] = (unsigned char)((pixels[k].x*0.299f + (float)pixels[k].y*0.587f + (float)pixels[k].z*0.114f)*255.0f);
((unsigned char *)image->data)[i + 1] = (unsigned char)(pixels[k].w*255.0f);