im_stats fix
This commit is contained in:
parent
b5f2c3e86d
commit
0534e5563d
1
TODO
1
TODO
|
@ -1,6 +1,5 @@
|
||||||
- make im__math and common up code between the trig/log funcs
|
- make im__math and common up code between the trig/log funcs
|
||||||
|
|
||||||
|
|
||||||
- 1-bit PNG read is broken?
|
- 1-bit PNG read is broken?
|
||||||
|
|
||||||
> The bug is that 1bit depth PNG addresses are incorrectly interpreted. At
|
> The bug is that 1bit depth PNG addresses are incorrectly interpreted. At
|
||||||
|
|
|
@ -47,16 +47,6 @@
|
||||||
* @(#) by 90 degrees clockwise.
|
* @(#) by 90 degrees clockwise.
|
||||||
* @(#) The filename member of the returned mask is set to name
|
* @(#) The filename member of the returned mask is set to name
|
||||||
* @(#)
|
* @(#)
|
||||||
* @(#) Prints a mask. Used mainly for debugging purposes
|
|
||||||
* @(#)
|
|
||||||
* @(#) Usage
|
|
||||||
* @(#) void im_print_dmask( m )
|
|
||||||
* @(#) DOUBLEMASK *m;
|
|
||||||
* @(#)
|
|
||||||
* @(#) Usage
|
|
||||||
* @(#) void im_print_imask( m )
|
|
||||||
* @(#) INTMASK *m;
|
|
||||||
* @(#)
|
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Author: N. Dessipris (Copyright, N. Dessipris 1991)
|
* Author: N. Dessipris (Copyright, N. Dessipris 1991)
|
||||||
|
@ -320,37 +310,3 @@ im_rotate_imask45( INTMASK *m, const char *name )
|
||||||
{
|
{
|
||||||
return( rotimask( im_offsets45, m, name ) );
|
return( rotimask( im_offsets45, m, name ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
im_print_imask( INTMASK *m )
|
|
||||||
{
|
|
||||||
int i, j, k;
|
|
||||||
int *pm = m->coeff;
|
|
||||||
|
|
||||||
fprintf( stderr, " %s: %d %d %d %d\n",
|
|
||||||
m->filename, m->xsize, m->ysize, m->scale, m->offset );
|
|
||||||
|
|
||||||
for( k = 0, j = 0; j < m->ysize; j++ ) {
|
|
||||||
for( i = 0; i < m->xsize; i++, k++ )
|
|
||||||
fprintf( stderr, "%d\t", pm[k] );
|
|
||||||
|
|
||||||
fprintf( stderr, "\n" );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
im_print_dmask( DOUBLEMASK *m )
|
|
||||||
{
|
|
||||||
int i, j, k;
|
|
||||||
double *pm = m->coeff;
|
|
||||||
|
|
||||||
fprintf( stderr, " %s: %d %d %f %f\n",
|
|
||||||
m->filename, m->xsize, m->ysize, m->scale, m->offset );
|
|
||||||
|
|
||||||
for( k = 0, j = 0; j < m->ysize; j++ ) {
|
|
||||||
for( i = 0; i < m->xsize; i++, k++ )
|
|
||||||
fprintf( stderr, "%f\t", pm[k] );
|
|
||||||
|
|
||||||
fprintf( stderr, "\n" );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -5,6 +5,16 @@
|
||||||
* @(#) The mask coefficients can be either int (INTMASK)
|
* @(#) The mask coefficients can be either int (INTMASK)
|
||||||
* @(#) or double (DOUBLEMASK).
|
* @(#) or double (DOUBLEMASK).
|
||||||
* @(#)
|
* @(#)
|
||||||
|
* @(#) Prints a mask. Used mainly for debugging purposes
|
||||||
|
* @(#)
|
||||||
|
* @(#) Usage
|
||||||
|
* @(#) void im_print_dmask( m )
|
||||||
|
* @(#) DOUBLEMASK *m;
|
||||||
|
* @(#)
|
||||||
|
* @(#) Usage
|
||||||
|
* @(#) void im_print_imask( m )
|
||||||
|
* @(#) INTMASK *m;
|
||||||
|
* @(#)
|
||||||
*
|
*
|
||||||
* Copyright: 1990, N. Dessipris.
|
* Copyright: 1990, N. Dessipris.
|
||||||
*
|
*
|
||||||
|
@ -45,6 +55,8 @@
|
||||||
* - use g_ascii_strtod() and friends
|
* - use g_ascii_strtod() and friends
|
||||||
* 2006-09-08 tcv
|
* 2006-09-08 tcv
|
||||||
* - add im_norm_dmask()
|
* - add im_norm_dmask()
|
||||||
|
* 1/9/09
|
||||||
|
* - move im_print_*mask() here
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -725,3 +737,37 @@ im_copy_matrix_dmask( double **matrix, DOUBLEMASK *mask )
|
||||||
for( x = 0; x < mask->xsize; x++ )
|
for( x = 0; x < mask->xsize; x++ )
|
||||||
*p++ = matrix[x][y];
|
*p++ = matrix[x][y];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
im_print_imask( INTMASK *m )
|
||||||
|
{
|
||||||
|
int i, j, k;
|
||||||
|
int *pm = m->coeff;
|
||||||
|
|
||||||
|
printf( "%s: %d %d %d %d\n",
|
||||||
|
m->filename, m->xsize, m->ysize, m->scale, m->offset );
|
||||||
|
|
||||||
|
for( k = 0, j = 0; j < m->ysize; j++ ) {
|
||||||
|
for( i = 0; i < m->xsize; i++, k++ )
|
||||||
|
printf( "%d\t", pm[k] );
|
||||||
|
|
||||||
|
printf( "\n" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
im_print_dmask( DOUBLEMASK *m )
|
||||||
|
{
|
||||||
|
int i, j, k;
|
||||||
|
double *pm = m->coeff;
|
||||||
|
|
||||||
|
printf( "%s: %d %d %f %f\n",
|
||||||
|
m->filename, m->xsize, m->ysize, m->scale, m->offset );
|
||||||
|
|
||||||
|
for( k = 0, j = 0; j < m->ysize; j++ ) {
|
||||||
|
for( i = 0; i < m->xsize; i++, k++ )
|
||||||
|
printf( "%f\t", pm[k] );
|
||||||
|
|
||||||
|
printf( "\n" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue