55
55
ret = fread(buf, 3*sizeof(float), img->width*img->height, f);
56
for(int i=img->width*img->height-1; i>=0; i--) for(int c=0; c<3; c++) buf[4*i+c] = fmaxf(0.0f, fminf(10000.0, buf[3*i+c]));
56
for(int i=img->width*img->height-1; i>=0; i--) for(int c=0; c<3; c++) buf[4*i+c] = fmaxf(0.0f, fminf(FLT_MAX, buf[3*i+c]));
58
58
else for(int j=0; j < img->height; j++)
59
59
for(int i=0; i < img->width; i++)