Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/image.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSoumith Chintala <soumith@gmail.com>2016-09-15 20:32:47 +0300
committerGitHub <noreply@github.com>2016-09-15 20:32:47 +0300
commit9f65c30167b2048ecbe8b7befdc6b2d6d12baee9 (patch)
tree8b419bee983c7444335d6f780a9ec5b4b95fc549
parenta22852344030a6a32dd804992477009bfad3de76 (diff)
parent46b219139d04821851e4b8de8cecd04025d42b76 (diff)
Merge pull request #191 from karandwivedi42/master
Fix Problem drawing colors in drawText
-rwxr-xr-xgeneric/image.c6
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,