diff options
| author | Michael Vetter <[email protected]> | 2019-08-07 09:23:15 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2019-08-07 09:23:15 +0200 |
| commit | 5f1990e0446354fcdbb9abcb852a4cb2d0175f00 (patch) | |
| tree | d8643e2c5b02f93a95d7a85774d395a7e313322c /src/textures.c | |
| parent | 3d46297cc150803a55e27f446b2d4708ff0b04bd (diff) | |
| download | raylib-5f1990e0446354fcdbb9abcb852a4cb2d0175f00.tar.gz raylib-5f1990e0446354fcdbb9abcb852a4cb2d0175f00.zip | |
Fix build caused by GetImageAlphaBorder() (#931)
Fix build failure introduced in 2a913b6587d60dab64c3b81019990e6872a9ac75
Diffstat (limited to 'src/textures.c')
| -rw-r--r-- | src/textures.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/textures.c b/src/textures.c index a25a23ab..56ff194a 100644 --- a/src/textures.c +++ b/src/textures.c @@ -681,7 +681,7 @@ Vector4 *GetImageDataNormalized(Image image) } // Get image alpha border rectangle -Rectangle GetImageAlphaBorder(Image image) +Rectangle GetImageAlphaBorder(Image image, float threshold) { Color *pixels = GetImageData(image); @@ -690,11 +690,11 @@ Rectangle GetImageAlphaBorder(Image image) int yMin = 65536; int yMax = 0; - for (int y = 0; y < image->height; y++) + for (int y = 0; y < image.height; y++) { - for (int x = 0; x < image->width; x++) + for (int x = 0; x < image.width; x++) { - if (pixels[y*image->width + x].a > (unsigned char)(threshold*255.0f)) + if (pixels[y*image.width + x].a > (unsigned char)(threshold*255.0f)) { if (x < xMin) xMin = x; if (x > xMax) xMax = x; |
