@@ -371,26 +371,28 @@ static ssize_t PrintChannelLocations(FILE *file,const Image *image,
371
371
static ssize_t PrintChannelMoments (FILE * file ,const PixelChannel channel ,
372
372
const char * name ,const ChannelMoments * channel_moments )
373
373
{
374
+ register ssize_t
375
+ i ;
376
+
374
377
ssize_t
375
378
n ;
376
379
377
- n = FormatLocaleFile (file ,"% s:\n" ,name );
378
- n += FormatLocaleFile (file ," i1: %.*g\n" ,GetMagickPrecision (),
379
- channel_moments [channel ].I1 );
380
- n += FormatLocaleFile (file ," i2: %.*g\n" ,GetMagickPrecision (),
381
- channel_moments [channel ].I2 );
382
- n += FormatLocaleFile (file ," i3: %.*g\n" ,GetMagickPrecision (),
383
- channel_moments [channel ].I3 );
384
- n += FormatLocaleFile (file ," i4: %.*g\n" ,GetMagickPrecision (),
385
- channel_moments [channel ].I4 );
386
- n += FormatLocaleFile (file ," i5: %.*g\n" ,GetMagickPrecision (),
387
- channel_moments [channel ].I5 );
388
- n += FormatLocaleFile (file ," i6: %.*g\n" ,GetMagickPrecision (),
389
- channel_moments [channel ].I6 );
390
- n += FormatLocaleFile (file ," i7: %.*g\n" ,GetMagickPrecision (),
391
- channel_moments [channel ].I7 );
392
- n += FormatLocaleFile (file ," i8: %.*g\n" ,GetMagickPrecision (),
393
- channel_moments [channel ].I8 );
380
+ n = FormatLocaleFile (file ," %s:\n" ,name );
381
+ n += FormatLocaleFile (file ," Centroid: %.*g,%.*g\n" ,
382
+ GetMagickPrecision (),channel_moments [channel ].centroid .x ,
383
+ GetMagickPrecision (),channel_moments [channel ].centroid .y );
384
+ n += FormatLocaleFile (file ," Ellipse Semi-Major/Minor axis: %.*g,%.*g\n" ,
385
+ GetMagickPrecision (),channel_moments [channel ].ellipse_axis .x ,
386
+ GetMagickPrecision (),channel_moments [channel ].ellipse_axis .y );
387
+ n += FormatLocaleFile (file ," Ellipse angle: %.*g\n" ,
388
+ GetMagickPrecision (),channel_moments [channel ].ellipse_angle );
389
+ n += FormatLocaleFile (file ," Ellipse eccentricity: %.*g\n" ,
390
+ GetMagickPrecision (),channel_moments [channel ].ellipse_eccentricity );
391
+ n += FormatLocaleFile (file ," Ellipse intensity: %.*g\n" ,
392
+ GetMagickPrecision (),channel_moments [channel ].ellipse_intensity );
393
+ for (i = 0 ; i < 8 ; i ++ )
394
+ n += FormatLocaleFile (file ," I%.20g: %.*g\n" ,i + 1.0 ,GetMagickPrecision (),
395
+ channel_moments [channel ].I [i ]);
394
396
return (n );
395
397
}
396
398
0 commit comments