diff options
author | Soumith Chintala <soumith@gmail.com> | 2016-09-15 20:32:47 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-15 20:32:47 +0300 |
commit | 9f65c30167b2048ecbe8b7befdc6b2d6d12baee9 (patch) | |
tree | 8b419bee983c7444335d6f780a9ec5b4b95fc549 | |
parent | a22852344030a6a32dd804992477009bfad3de76 (diff) | |
parent | 46b219139d04821851e4b8de8cecd04025d42b76 (diff) |
Merge pull request #191 from karandwivedi42/master
Fix Problem drawing colors in drawText
-rwxr-xr-x | generic/image.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/image.c b/generic/image.c index f30fcad..1f5163b 100755 --- a/generic/image.c +++ b/generic/image.c @@ -2116,9 +2116,9 @@ static inline void image_(drawPixel)(THTensor *output, int y, int x, THTensor_(set3d)(output, 1, y, x, cg); THTensor_(set3d)(output, 2, y, x, cb); #else - THTensor_(set3d)(output, 0, y, x, cr / 255); - THTensor_(set3d)(output, 1, y, x, cg / 255); - THTensor_(set3d)(output, 2, y, x, cb / 255); + THTensor_(set3d)(output, 0, y, x, cr / 255.0f); + THTensor_(set3d)(output, 1, y, x, cg / 255.0f); + THTensor_(set3d)(output, 2, y, x, cb / 255.0f); #endif } static inline void image_(drawChar)(THTensor *output, int x, int y, unsigned char c, int size, |