48 int expon, max_exp = -2000;
49 float * fptr = floats;
59 for (i = 0; i < count; i++)
61 frexp( *fptr++, &expon );
62 max_exp = (expon > max_exp) ? expon : max_exp;
66 if (max_exp > 128) max_exp = 128;
68 if (max_exp < -127) max_exp = -127;
70 f_exp = ldexp( 256.0, -max_exp );
73 for( i = 0; i < count; i++ )
74 *pixels++ = (
rle_pixel) ((
int)(*fptr++ * f_exp));
void float_to_exp(int count, float *floats, rle_pixel *pixels)