equal
deleted
inserted
replaced
283 |
283 |
284 struct image *img; |
284 struct image *img; |
285 new_image(&img, w, h, 3); |
285 new_image(&img, w, h, 3); |
286 |
286 |
287 Float *fd = fdata; |
287 Float *fd = fdata; |
288 for (char *cd = img->data; cd != img->data + w*h*3; cd++, fd++) { |
288 for (unsigned char *cd = img->data; cd != img->data + w*h*3; cd++, fd++) { |
289 if (*fd > 1.0) |
289 if (*fd > 1.0) |
290 *cd = 255; |
290 *cd = 255; |
291 else |
291 else |
292 *cd = (unsigned char)(*fd * 255.0); |
292 *cd = (unsigned char)(*fd * 255.0); |
293 } |
293 } |