}
InvertAffineCoefficients(coeff, inverse);
CoefficientsToAffineArgs(inverse);
- FormatLocaleFile(stderr, "Affine Projection:\n");
- FormatLocaleFile(stderr, " -distort AffineProjection \\\n '");
+ (void) FormatLocaleFile(stderr, "Affine Projection:\n");
+ (void) FormatLocaleFile(stderr, " -distort AffineProjection \\\n '");
for (i=0; i < 5; i++)
- FormatLocaleFile(stderr, "%lf,", inverse[i]);
- FormatLocaleFile(stderr, "%lf'\n", inverse[5]);
+ (void) FormatLocaleFile(stderr, "%lf,", inverse[i]);
+ (void) FormatLocaleFile(stderr, "%lf'\n", inverse[5]);
inverse = (double *) RelinquishMagickMemory(inverse);
- FormatLocaleFile(stderr, "Affine Distort, FX Equivelent:\n");
- FormatLocaleFile(stderr, "%s", image_gen);
- FormatLocaleFile(stderr, " -fx 'ii=i+page.x+0.5; jj=j+page.y+0.5;\n");
- FormatLocaleFile(stderr, " xx=%+lf*ii %+lf*jj %+lf;\n",
+ (void) FormatLocaleFile(stderr, "Affine Distort, FX Equivelent:\n");
+ (void) FormatLocaleFile(stderr, "%s", image_gen);
+ (void) FormatLocaleFile(stderr, " -fx 'ii=i+page.x+0.5; jj=j+page.y+0.5;\n");
+ (void) FormatLocaleFile(stderr, " xx=%+lf*ii %+lf*jj %+lf;\n",
coeff[0], coeff[1], coeff[2]);
- FormatLocaleFile(stderr, " yy=%+lf*ii %+lf*jj %+lf;\n",
+ (void) FormatLocaleFile(stderr, " yy=%+lf*ii %+lf*jj %+lf;\n",
coeff[3], coeff[4], coeff[5]);
- FormatLocaleFile(stderr, " %s'\n", lookup);
+ (void) FormatLocaleFile(stderr, " %s'\n", lookup);
break;
}
return((Image *) NULL);
}
InvertPerspectiveCoefficients(coeff, inverse);
- FormatLocaleFile(stderr, "Perspective Projection:\n");
- FormatLocaleFile(stderr, " -distort PerspectiveProjection \\\n '");
+ (void) FormatLocaleFile(stderr, "Perspective Projection:\n");
+ (void) FormatLocaleFile(stderr, " -distort PerspectiveProjection \\\n '");
for (i=0; i<4; i++)
- FormatLocaleFile(stderr, "%lf, ", inverse[i]);
- FormatLocaleFile(stderr, "\n ");
+ (void) FormatLocaleFile(stderr, "%lf, ", inverse[i]);
+ (void) FormatLocaleFile(stderr, "\n ");
for (; i<7; i++)
- FormatLocaleFile(stderr, "%lf, ", inverse[i]);
- FormatLocaleFile(stderr, "%lf'\n", inverse[7]);
+ (void) FormatLocaleFile(stderr, "%lf, ", inverse[i]);
+ (void) FormatLocaleFile(stderr, "%lf'\n", inverse[7]);
inverse = (double *) RelinquishMagickMemory(inverse);
- FormatLocaleFile(stderr, "Perspective Distort, FX Equivelent:\n");
- FormatLocaleFile(stderr, "%s", image_gen);
- FormatLocaleFile(stderr, " -fx 'ii=i+page.x+0.5; jj=j+page.y+0.5;\n");
- FormatLocaleFile(stderr, " rr=%+lf*ii %+lf*jj + 1;\n",
+ (void) FormatLocaleFile(stderr, "Perspective Distort, FX Equivelent:\n");
+ (void) FormatLocaleFile(stderr, "%s", image_gen);
+ (void) FormatLocaleFile(stderr, " -fx 'ii=i+page.x+0.5; jj=j+page.y+0.5;\n");
+ (void) FormatLocaleFile(stderr, " rr=%+lf*ii %+lf*jj + 1;\n",
coeff[6], coeff[7]);
- FormatLocaleFile(stderr, " xx=(%+lf*ii %+lf*jj %+lf)/rr;\n",
+ (void) FormatLocaleFile(stderr, " xx=(%+lf*ii %+lf*jj %+lf)/rr;\n",
coeff[0], coeff[1], coeff[2]);
- FormatLocaleFile(stderr, " yy=(%+lf*ii %+lf*jj %+lf)/rr;\n",
+ (void) FormatLocaleFile(stderr, " yy=(%+lf*ii %+lf*jj %+lf)/rr;\n",
coeff[3], coeff[4], coeff[5]);
- FormatLocaleFile(stderr, " rr%s0 ? %s : blue'\n",
+ (void) FormatLocaleFile(stderr, " rr%s0 ? %s : blue'\n",
coeff[8] < 0 ? "<" : ">", lookup);
break;
}
case BilinearForwardDistortion:
- FormatLocaleFile(stderr, "BilinearForward Mapping Equations:\n");
- FormatLocaleFile(stderr, "%s", image_gen);
- FormatLocaleFile(stderr, " i = %+lf*x %+lf*y %+lf*x*y %+lf;\n",
+ (void) FormatLocaleFile(stderr, "BilinearForward Mapping Equations:\n");
+ (void) FormatLocaleFile(stderr, "%s", image_gen);
+ (void) FormatLocaleFile(stderr, " i = %+lf*x %+lf*y %+lf*x*y %+lf;\n",
coeff[0], coeff[1], coeff[2], coeff[3]);
- FormatLocaleFile(stderr, " j = %+lf*x %+lf*y %+lf*x*y %+lf;\n",
+ (void) FormatLocaleFile(stderr, " j = %+lf*x %+lf*y %+lf*x*y %+lf;\n",
coeff[4], coeff[5], coeff[6], coeff[7]);
#if 0
/* for debugging */
- FormatLocaleFile(stderr, " c8 = %+lf c9 = 2*a = %+lf;\n",
+ (void) FormatLocaleFile(stderr, " c8 = %+lf c9 = 2*a = %+lf;\n",
coeff[8], coeff[9]);
#endif
- FormatLocaleFile(stderr, "BilinearForward Distort, FX Equivelent:\n");
- FormatLocaleFile(stderr, "%s", image_gen);
- FormatLocaleFile(stderr, " -fx 'ii=i+page.x%+lf; jj=j+page.y%+lf;\n",
+ (void) FormatLocaleFile(stderr, "BilinearForward Distort, FX Equivelent:\n");
+ (void) FormatLocaleFile(stderr, "%s", image_gen);
+ (void) FormatLocaleFile(stderr, " -fx 'ii=i+page.x%+lf; jj=j+page.y%+lf;\n",
0.5-coeff[3], 0.5-coeff[7]);
- FormatLocaleFile(stderr, " bb=%lf*ii %+lf*jj %+lf;\n",
+ (void) FormatLocaleFile(stderr, " bb=%lf*ii %+lf*jj %+lf;\n",
coeff[6], -coeff[2], coeff[8]);
/* Handle Special degenerate (non-quadratic) or trapezoidal case */
if ( coeff[9] != 0 ) {
- FormatLocaleFile(stderr, " rt=bb*bb %+lf*(%lf*ii%+lf*jj);\n",
+ (void) FormatLocaleFile(stderr, " rt=bb*bb %+lf*(%lf*ii%+lf*jj);\n",
-2*coeff[9], coeff[4], -coeff[0]);
- FormatLocaleFile(stderr, " yy=( -bb + sqrt(rt) ) / %lf;\n",
+ (void) FormatLocaleFile(stderr, " yy=( -bb + sqrt(rt) ) / %lf;\n",
coeff[9]);
} else
- FormatLocaleFile(stderr, " yy=(%lf*ii%+lf*jj)/bb;\n",
+ (void) FormatLocaleFile(stderr, " yy=(%lf*ii%+lf*jj)/bb;\n",
-coeff[4], coeff[0]);
- FormatLocaleFile(stderr, " xx=(ii %+lf*yy)/(%lf %+lf*yy);\n",
+ (void) FormatLocaleFile(stderr, " xx=(ii %+lf*yy)/(%lf %+lf*yy);\n",
-coeff[1], coeff[0], coeff[2]);
if ( coeff[9] != 0 )
- FormatLocaleFile(stderr, " (rt < 0 ) ? red : %s'\n", lookup);
+ (void) FormatLocaleFile(stderr, " (rt < 0 ) ? red : %s'\n", lookup);
else
- FormatLocaleFile(stderr, " %s'\n", lookup);
+ (void) FormatLocaleFile(stderr, " %s'\n", lookup);
break;
case BilinearReverseDistortion:
#if 0
- FormatLocaleFile(stderr, "Polynomial Projection Distort:\n");
- FormatLocaleFile(stderr, " -distort PolynomialProjection \\\n");
- FormatLocaleFile(stderr, " '1.5, %lf, %lf, %lf, %lf,\n",
+ (void) FormatLocaleFile(stderr, "Polynomial Projection Distort:\n");
+ (void) FormatLocaleFile(stderr, " -distort PolynomialProjection \\\n");
+ (void) FormatLocaleFile(stderr, " '1.5, %lf, %lf, %lf, %lf,\n",
coeff[3], coeff[0], coeff[1], coeff[2]);
- FormatLocaleFile(stderr, " %lf, %lf, %lf, %lf'\n",
+ (void) FormatLocaleFile(stderr, " %lf, %lf, %lf, %lf'\n",
coeff[7], coeff[4], coeff[5], coeff[6]);
#endif
- FormatLocaleFile(stderr, "BilinearReverse Distort, FX Equivelent:\n");
- FormatLocaleFile(stderr, "%s", image_gen);
- FormatLocaleFile(stderr, " -fx 'ii=i+page.x+0.5; jj=j+page.y+0.5;\n");
- FormatLocaleFile(stderr, " xx=%+lf*ii %+lf*jj %+lf*ii*jj %+lf;\n",
+ (void) FormatLocaleFile(stderr, "BilinearReverse Distort, FX Equivelent:\n");
+ (void) FormatLocaleFile(stderr, "%s", image_gen);
+ (void) FormatLocaleFile(stderr, " -fx 'ii=i+page.x+0.5; jj=j+page.y+0.5;\n");
+ (void) FormatLocaleFile(stderr, " xx=%+lf*ii %+lf*jj %+lf*ii*jj %+lf;\n",
coeff[0], coeff[1], coeff[2], coeff[3]);
- FormatLocaleFile(stderr, " yy=%+lf*ii %+lf*jj %+lf*ii*jj %+lf;\n",
+ (void) FormatLocaleFile(stderr, " yy=%+lf*ii %+lf*jj %+lf*ii*jj %+lf;\n",
coeff[4], coeff[5], coeff[6], coeff[7]);
- FormatLocaleFile(stderr, " %s'\n", lookup);
+ (void) FormatLocaleFile(stderr, " %s'\n", lookup);
break;
case PolynomialDistortion:
{
size_t nterms = (size_t) coeff[1];
- FormatLocaleFile(stderr, "Polynomial (order %lg, terms %lu), FX Equivelent\n",
+ (void) FormatLocaleFile(stderr, "Polynomial (order %lg, terms %lu), FX Equivelent\n",
coeff[0],(unsigned long) nterms);
- FormatLocaleFile(stderr, "%s", image_gen);
- FormatLocaleFile(stderr, " -fx 'ii=i+page.x+0.5; jj=j+page.y+0.5;\n");
- FormatLocaleFile(stderr, " xx =");
+ (void) FormatLocaleFile(stderr, "%s", image_gen);
+ (void) FormatLocaleFile(stderr, " -fx 'ii=i+page.x+0.5; jj=j+page.y+0.5;\n");
+ (void) FormatLocaleFile(stderr, " xx =");
for (i=0; i<(ssize_t) nterms; i++) {
- if ( i != 0 && i%4 == 0 ) FormatLocaleFile(stderr, "\n ");
- FormatLocaleFile(stderr, " %+lf%s", coeff[2+i],
+ if ( i != 0 && i%4 == 0 ) (void) FormatLocaleFile(stderr, "\n ");
+ (void) FormatLocaleFile(stderr, " %+lf%s", coeff[2+i],
poly_basis_str(i));
}
- FormatLocaleFile(stderr, ";\n yy =");
+ (void) FormatLocaleFile(stderr, ";\n yy =");
for (i=0; i<(ssize_t) nterms; i++) {
- if ( i != 0 && i%4 == 0 ) FormatLocaleFile(stderr, "\n ");
- FormatLocaleFile(stderr, " %+lf%s", coeff[2+i+nterms],
+ if ( i != 0 && i%4 == 0 ) (void) FormatLocaleFile(stderr, "\n ");
+ (void) FormatLocaleFile(stderr, " %+lf%s", coeff[2+i+nterms],
poly_basis_str(i));
}
- FormatLocaleFile(stderr, ";\n %s'\n", lookup);
+ (void) FormatLocaleFile(stderr, ";\n %s'\n", lookup);
break;
}
case ArcDistortion:
{
- FormatLocaleFile(stderr, "Arc Distort, Internal Coefficients:\n");
+ (void) FormatLocaleFile(stderr, "Arc Distort, Internal Coefficients:\n");
for ( i=0; i<5; i++ )
- FormatLocaleFile(stderr, " c%.20g = %+lf\n", (double) i, coeff[i]);
- FormatLocaleFile(stderr, "Arc Distort, FX Equivelent:\n");
- FormatLocaleFile(stderr, "%s", image_gen);
- FormatLocaleFile(stderr, " -fx 'ii=i+page.x; jj=j+page.y;\n");
- FormatLocaleFile(stderr, " xx=(atan2(jj,ii)%+lf)/(2*pi);\n",
+ (void) FormatLocaleFile(stderr, " c%.20g = %+lf\n", (double) i, coeff[i]);
+ (void) FormatLocaleFile(stderr, "Arc Distort, FX Equivelent:\n");
+ (void) FormatLocaleFile(stderr, "%s", image_gen);
+ (void) FormatLocaleFile(stderr, " -fx 'ii=i+page.x; jj=j+page.y;\n");
+ (void) FormatLocaleFile(stderr, " xx=(atan2(jj,ii)%+lf)/(2*pi);\n",
-coeff[0]);
- FormatLocaleFile(stderr, " xx=xx-round(xx);\n");
- FormatLocaleFile(stderr, " xx=xx*%lf %+lf;\n",
+ (void) FormatLocaleFile(stderr, " xx=xx-round(xx);\n");
+ (void) FormatLocaleFile(stderr, " xx=xx*%lf %+lf;\n",
coeff[1], coeff[4]);
- FormatLocaleFile(stderr, " yy=(%lf - hypot(ii,jj)) * %lf;\n",
+ (void) FormatLocaleFile(stderr, " yy=(%lf - hypot(ii,jj)) * %lf;\n",
coeff[2], coeff[3]);
- FormatLocaleFile(stderr, " v.p{xx-.5,yy-.5}'\n");
+ (void) FormatLocaleFile(stderr, " v.p{xx-.5,yy-.5}'\n");
break;
}
case PolarDistortion:
{
- FormatLocaleFile(stderr, "Polar Distort, Internal Coefficents\n");
+ (void) FormatLocaleFile(stderr, "Polar Distort, Internal Coefficents\n");
for ( i=0; i<8; i++ )
- FormatLocaleFile(stderr, " c%.20g = %+lf\n", (double) i, coeff[i]);
- FormatLocaleFile(stderr, "Polar Distort, FX Equivelent:\n");
- FormatLocaleFile(stderr, "%s", image_gen);
- FormatLocaleFile(stderr, " -fx 'ii=i+page.x%+lf; jj=j+page.y%+lf;\n",
+ (void) FormatLocaleFile(stderr, " c%.20g = %+lf\n", (double) i, coeff[i]);
+ (void) FormatLocaleFile(stderr, "Polar Distort, FX Equivelent:\n");
+ (void) FormatLocaleFile(stderr, "%s", image_gen);
+ (void) FormatLocaleFile(stderr, " -fx 'ii=i+page.x%+lf; jj=j+page.y%+lf;\n",
-coeff[2], -coeff[3]);
- FormatLocaleFile(stderr, " xx=(atan2(ii,jj)%+lf)/(2*pi);\n",
+ (void) FormatLocaleFile(stderr, " xx=(atan2(ii,jj)%+lf)/(2*pi);\n",
-(coeff[4]+coeff[5])/2 );
- FormatLocaleFile(stderr, " xx=xx-round(xx);\n");
- FormatLocaleFile(stderr, " xx=xx*2*pi*%lf + v.w/2;\n",
+ (void) FormatLocaleFile(stderr, " xx=xx-round(xx);\n");
+ (void) FormatLocaleFile(stderr, " xx=xx*2*pi*%lf + v.w/2;\n",
coeff[6] );
- FormatLocaleFile(stderr, " yy=(hypot(ii,jj)%+lf)*%lf;\n",
+ (void) FormatLocaleFile(stderr, " yy=(hypot(ii,jj)%+lf)*%lf;\n",
-coeff[1], coeff[7] );
- FormatLocaleFile(stderr, " v.p{xx-.5,yy-.5}'\n");
+ (void) FormatLocaleFile(stderr, " v.p{xx-.5,yy-.5}'\n");
break;
}
case DePolarDistortion:
{
- FormatLocaleFile(stderr, "DePolar Distort, Internal Coefficents\n");
+ (void) FormatLocaleFile(stderr, "DePolar Distort, Internal Coefficents\n");
for ( i=0; i<8; i++ )
- FormatLocaleFile(stderr, " c%.20g = %+lf\n", (double) i, coeff[i]);
- FormatLocaleFile(stderr, "DePolar Distort, FX Equivelent:\n");
- FormatLocaleFile(stderr, "%s", image_gen);
- FormatLocaleFile(stderr, " -fx 'aa=(i+.5)*%lf %+lf;\n", coeff[6], -coeff[4] );
- FormatLocaleFile(stderr, " rr=(j+.5)*%lf %+lf;\n", coeff[7], +coeff[1] );
- FormatLocaleFile(stderr, " xx=rr*sin(aa) %+lf;\n", coeff[2] );
- FormatLocaleFile(stderr, " yy=rr*cos(aa) %+lf;\n", coeff[3] );
- FormatLocaleFile(stderr, " v.p{xx-.5,yy-.5}'\n");
+ (void) FormatLocaleFile(stderr, " c%.20g = %+lf\n", (double) i, coeff[i]);
+ (void) FormatLocaleFile(stderr, "DePolar Distort, FX Equivelent:\n");
+ (void) FormatLocaleFile(stderr, "%s", image_gen);
+ (void) FormatLocaleFile(stderr, " -fx 'aa=(i+.5)*%lf %+lf;\n", coeff[6], -coeff[4] );
+ (void) FormatLocaleFile(stderr, " rr=(j+.5)*%lf %+lf;\n", coeff[7], +coeff[1] );
+ (void) FormatLocaleFile(stderr, " xx=rr*sin(aa) %+lf;\n", coeff[2] );
+ (void) FormatLocaleFile(stderr, " yy=rr*cos(aa) %+lf;\n", coeff[3] );
+ (void) FormatLocaleFile(stderr, " v.p{xx-.5,yy-.5}'\n");
break;
}
case BarrelDistortion:
*/
xc = ((double)image->columns-1.0)/2.0 + image->page.x;
yc = ((double)image->rows-1.0)/2.0 + image->page.y;
- FormatLocaleFile(stderr, "Barrel%s Distort, FX Equivelent:\n",
+ (void) FormatLocaleFile(stderr, "Barrel%s Distort, FX Equivelent:\n",
method == BarrelDistortion ? "" : "Inv");
- FormatLocaleFile(stderr, "%s", image_gen);
+ (void) FormatLocaleFile(stderr, "%s", image_gen);
if ( fabs(coeff[8]-xc-0.5) < 0.1 && fabs(coeff[9]-yc-0.5) < 0.1 )
- FormatLocaleFile(stderr, " -fx 'xc=(w-1)/2; yc=(h-1)/2;\n");
+ (void) FormatLocaleFile(stderr, " -fx 'xc=(w-1)/2; yc=(h-1)/2;\n");
else
- FormatLocaleFile(stderr, " -fx 'xc=%lf; yc=%lf;\n",
+ (void) FormatLocaleFile(stderr, " -fx 'xc=%lf; yc=%lf;\n",
coeff[8]-0.5, coeff[9]-0.5);
- FormatLocaleFile(stderr,
+ (void) FormatLocaleFile(stderr,
" ii=i-xc; jj=j-yc; rr=hypot(ii,jj);\n");
- FormatLocaleFile(stderr, " ii=ii%s(%lf*rr*rr*rr %+lf*rr*rr %+lf*rr %+lf);\n",
+ (void) FormatLocaleFile(stderr, " ii=ii%s(%lf*rr*rr*rr %+lf*rr*rr %+lf*rr %+lf);\n",
method == BarrelDistortion ? "*" : "/",
coeff[0],coeff[1],coeff[2],coeff[3]);
- FormatLocaleFile(stderr, " jj=jj%s(%lf*rr*rr*rr %+lf*rr*rr %+lf*rr %+lf);\n",
+ (void) FormatLocaleFile(stderr, " jj=jj%s(%lf*rr*rr*rr %+lf*rr*rr %+lf*rr %+lf);\n",
method == BarrelDistortion ? "*" : "/",
coeff[4],coeff[5],coeff[6],coeff[7]);
- FormatLocaleFile(stderr, " v.p{fx*ii+xc,fy*jj+yc}'\n");
+ (void) FormatLocaleFile(stderr, " v.p{fx*ii+xc,fy*jj+yc}'\n");
}
default:
break;
case BarycentricColorInterpolate:
{
register ssize_t x=0;
- FormatLocaleFile(stderr, "Barycentric Sparse Color:\n");
+ (void) FormatLocaleFile(stderr, "Barycentric Sparse Color:\n");
if ( channel & RedChannel )
- FormatLocaleFile(stderr, " -channel R -fx '%+lf*i %+lf*j %+lf' \\\n",
+ (void) FormatLocaleFile(stderr, " -channel R -fx '%+lf*i %+lf*j %+lf' \\\n",
coeff[x], coeff[x+1], coeff[x+2]),x+=3;
if ( channel & GreenChannel )
- FormatLocaleFile(stderr, " -channel G -fx '%+lf*i %+lf*j %+lf' \\\n",
+ (void) FormatLocaleFile(stderr, " -channel G -fx '%+lf*i %+lf*j %+lf' \\\n",
coeff[x], coeff[x+1], coeff[x+2]),x+=3;
if ( channel & BlueChannel )
- FormatLocaleFile(stderr, " -channel B -fx '%+lf*i %+lf*j %+lf' \\\n",
+ (void) FormatLocaleFile(stderr, " -channel B -fx '%+lf*i %+lf*j %+lf' \\\n",
coeff[x], coeff[x+1], coeff[x+2]),x+=3;
if ( channel & IndexChannel )
- FormatLocaleFile(stderr, " -channel K -fx '%+lf*i %+lf*j %+lf' \\\n",
+ (void) FormatLocaleFile(stderr, " -channel K -fx '%+lf*i %+lf*j %+lf' \\\n",
coeff[x], coeff[x+1], coeff[x+2]),x+=3;
if ( channel & OpacityChannel )
- FormatLocaleFile(stderr, " -channel A -fx '%+lf*i %+lf*j %+lf' \\\n",
+ (void) FormatLocaleFile(stderr, " -channel A -fx '%+lf*i %+lf*j %+lf' \\\n",
coeff[x], coeff[x+1], coeff[x+2]),x+=3;
break;
}
case BilinearColorInterpolate:
{
register ssize_t x=0;
- FormatLocaleFile(stderr, "Bilinear Sparse Color\n");
+ (void) FormatLocaleFile(stderr, "Bilinear Sparse Color\n");
if ( channel & RedChannel )
- FormatLocaleFile(stderr, " -channel R -fx '%+lf*i %+lf*j %+lf*i*j %+lf;\n",
+ (void) FormatLocaleFile(stderr, " -channel R -fx '%+lf*i %+lf*j %+lf*i*j %+lf;\n",
coeff[ x ], coeff[x+1],
coeff[x+2], coeff[x+3]),x+=4;
if ( channel & GreenChannel )
- FormatLocaleFile(stderr, " -channel G -fx '%+lf*i %+lf*j %+lf*i*j %+lf;\n",
+ (void) FormatLocaleFile(stderr, " -channel G -fx '%+lf*i %+lf*j %+lf*i*j %+lf;\n",
coeff[ x ], coeff[x+1],
coeff[x+2], coeff[x+3]),x+=4;
if ( channel & BlueChannel )
- FormatLocaleFile(stderr, " -channel B -fx '%+lf*i %+lf*j %+lf*i*j %+lf;\n",
+ (void) FormatLocaleFile(stderr, " -channel B -fx '%+lf*i %+lf*j %+lf*i*j %+lf;\n",
coeff[ x ], coeff[x+1],
coeff[x+2], coeff[x+3]),x+=4;
if ( channel & IndexChannel )
- FormatLocaleFile(stderr, " -channel K -fx '%+lf*i %+lf*j %+lf*i*j %+lf;\n",
+ (void) FormatLocaleFile(stderr, " -channel K -fx '%+lf*i %+lf*j %+lf*i*j %+lf;\n",
coeff[ x ], coeff[x+1],
coeff[x+2], coeff[x+3]),x+=4;
if ( channel & OpacityChannel )
- FormatLocaleFile(stderr, " -channel A -fx '%+lf*i %+lf*j %+lf*i*j %+lf;\n",
+ (void) FormatLocaleFile(stderr, " -channel A -fx '%+lf*i %+lf*j %+lf*i*j %+lf;\n",
coeff[ x ], coeff[x+1],
coeff[x+2], coeff[x+3]),x+=4;
break;
*/
#if DEBUG_OPT_FRAME
i=0;
- FormatLocaleFile(stderr, "frame %.20g :-\n", (double) i);
+ (void) FormatLocaleFile(stderr, "frame %.20g :-\n", (double) i);
#endif
disposals[0]=NoneDispose;
bounds[0]=CompareImageBounds(prev_image,curr,CompareAnyLayer,exception);
#if DEBUG_OPT_FRAME
- FormatLocaleFile(stderr, "overlay: %.20gx%.20g%+.20g%+.20g\n\n",
+ (void) FormatLocaleFile(stderr, "overlay: %.20gx%.20g%+.20g%+.20g\n\n",
(double) bounds[i].width,(double) bounds[i].height,
(double) bounds[i].x,(double) bounds[i].y );
#endif
for ( ; curr != (const Image *) NULL; curr=GetNextImageInList(curr))
{
#if DEBUG_OPT_FRAME
- FormatLocaleFile(stderr, "frame %.20g :-\n", (double) i);
+ (void) FormatLocaleFile(stderr, "frame %.20g :-\n", (double) i);
#endif
/*
Assume none disposal is the best
cleared=IsBoundsCleared(curr->previous,curr,&bounds[i],exception);
disposals[i-1]=NoneDispose;
#if DEBUG_OPT_FRAME
- FormatLocaleFile(stderr, "overlay: %.20gx%.20g%+.20g%+.20g%s%s\n",
+ (void) FormatLocaleFile(stderr, "overlay: %.20gx%.20g%+.20g%+.20g%s%s\n",
(double) bounds[i].width,(double) bounds[i].height,
(double) bounds[i].x,(double) bounds[i].y,
bounds[i].x < 0?" (unchanged)":"",
try_bounds=CompareImageBounds(prev_image,curr,CompareAnyLayer,exception);
try_cleared=IsBoundsCleared(prev_image,curr,&try_bounds,exception);
#if DEBUG_OPT_FRAME
- FormatLocaleFile(stderr, "test_prev: %.20gx%.20g%+.20g%+.20g%s\n",
+ (void) FormatLocaleFile(stderr, "test_prev: %.20gx%.20g%+.20g%+.20g%s\n",
(double) try_bounds.width,(double) try_bounds.height,
(double) try_bounds.x,(double) try_bounds.y,
try_cleared?" (pixels were cleared)":"");
bounds[i]=try_bounds;
disposals[i-1]=PreviousDispose;
#if DEBUG_OPT_FRAME
- FormatLocaleFile(stderr, "previous: accepted\n");
+ (void) FormatLocaleFile(stderr, "previous: accepted\n");
} else {
- FormatLocaleFile(stderr, "previous: rejected\n");
+ (void) FormatLocaleFile(stderr, "previous: rejected\n");
#endif
}
try_bounds=CompareImageBounds(bgnd_image,curr,CompareAnyLayer,exception);
try_cleared=IsBoundsCleared(bgnd_image,curr,&try_bounds,exception);
#if DEBUG_OPT_FRAME
- FormatLocaleFile(stderr, "background: %s\n",
+ (void) FormatLocaleFile(stderr, "background: %s\n",
try_cleared?"(pixels cleared)":"");
#endif
if ( try_cleared )
*/
try_bounds=CompareImageBounds(curr->previous,curr,CompareClearLayer,exception);
#if DEBUG_OPT_FRAME
- FormatLocaleFile(stderr, "expand_clear: %.20gx%.20g%+.20g%+.20g%s\n",
+ (void) FormatLocaleFile(stderr, "expand_clear: %.20gx%.20g%+.20g%+.20g%s\n",
(double) try_bounds.width,(double) try_bounds.height,
(double) try_bounds.x,(double) try_bounds.y,
try_bounds.x<0?" (no expand nessary)":"");
else
{
#if DEBUG_OPT_FRAME
- FormatLocaleFile(stderr, "expand_bgnd: %.20gx%.20g%+.20g%+.20g\n",
+ (void) FormatLocaleFile(stderr, "expand_bgnd: %.20gx%.20g%+.20g%+.20g\n",
(double) bgnd_bounds.width,(double) bgnd_bounds.height,
(double) bgnd_bounds.x,(double) bgnd_bounds.y );
#endif
bgnd_bounds.height = try_bounds.height;
}
#if DEBUG_OPT_FRAME
- FormatLocaleFile(stderr, " to : %.20gx%.20g%+.20g%+.20g\n",
+ (void) FormatLocaleFile(stderr, " to : %.20gx%.20g%+.20g%+.20g\n",
(double) bgnd_bounds.width,(double) bgnd_bounds.height,
(double) bgnd_bounds.x,(double) bgnd_bounds.y );
#endif
* Only CompareOverlay seemed to return something sensible.
*/
try_bounds=CompareImageBounds(bgnd_image,curr,CompareClearLayer,exception);
- FormatLocaleFile(stderr, "expand_ctst: %.20gx%.20g%+.20g%+.20g\n",
+ (void) FormatLocaleFile(stderr, "expand_ctst: %.20gx%.20g%+.20g%+.20g\n",
(double) try_bounds.width,(double) try_bounds.height,
(double) try_bounds.x,(double) try_bounds.y );
try_bounds=CompareImageBounds(bgnd_image,curr,CompareAnyLayer,exception);
try_cleared=IsBoundsCleared(bgnd_image,curr,&try_bounds,exception);
- FormatLocaleFile(stderr, "expand_any : %.20gx%.20g%+.20g%+.20g%s\n",
+ (void) FormatLocaleFile(stderr, "expand_any : %.20gx%.20g%+.20g%+.20g%s\n",
(double) try_bounds.width,(double) try_bounds.height,
(double) try_bounds.x,(double) try_bounds.y,
try_cleared?" (pixels cleared)":"");
try_bounds=CompareImageBounds(bgnd_image,curr,CompareOverlayLayer,exception);
#if DEBUG_OPT_FRAME
try_cleared=IsBoundsCleared(bgnd_image,curr,&try_bounds,exception);
- FormatLocaleFile(stderr, "expand_test: %.20gx%.20g%+.20g%+.20g%s\n",
+ (void) FormatLocaleFile(stderr, "expand_test: %.20gx%.20g%+.20g%+.20g%s\n",
(double) try_bounds.width,(double) try_bounds.height,
(double) try_bounds.x,(double) try_bounds.y,
try_cleared?" (pixels cleared)":"");
dup_image=DestroyImage(dup_image);
disposals[i-1]=BackgroundDispose;
#if DEBUG_OPT_FRAME
- FormatLocaleFile(stderr, "expand_bgnd: accepted\n");
+ (void) FormatLocaleFile(stderr, "expand_bgnd: accepted\n");
} else {
- FormatLocaleFile(stderr, "expand_bgnd: reject\n");
+ (void) FormatLocaleFile(stderr, "expand_bgnd: reject\n");
#endif
}
}
assert(prev_image != (Image *) NULL);
disposals[i]=disposals[i-1];
#if DEBUG_OPT_FRAME
- FormatLocaleFile(stderr, "final %.20g : %s %.20gx%.20g%+.20g%+.20g\n",
+ (void) FormatLocaleFile(stderr, "final %.20g : %s %.20gx%.20g%+.20g%+.20g\n",
(double) i-1,
CommandOptionToMnemonic(MagickDisposeOptions, disposals[i-1]),
(double) bounds[i-1].width, (double) bounds[i-1].height,
(double) bounds[i-1].x, (double) bounds[i-1].y );
#endif
#if DEBUG_OPT_FRAME
- FormatLocaleFile(stderr, "interum %.20g : %s %.20gx%.20g%+.20g%+.20g\n",
+ (void) FormatLocaleFile(stderr, "interum %.20g : %s %.20gx%.20g%+.20g%+.20g\n",
(double) i,
CommandOptionToMnemonic(MagickDisposeOptions, disposals[i]),
(double) bounds[i].width, (double) bounds[i].height,
(double) bounds[i].x, (double) bounds[i].y );
- FormatLocaleFile(stderr, "\n");
+ (void) FormatLocaleFile(stderr, "\n");
#endif
i++;
}
#if 0
/* For Debugging Geometry Input */
- FormatLocaleFile(stderr, "Geometry = 0x%04X : %lg x %lg %+lg %+lg\n",
+ (void) FormatLocaleFile(stderr, "Geometry = 0x%04X : %lg x %lg %+lg %+lg\n",
flags, args.rho, args.sigma, args.xi, args.psi );
#endif
/* Error handling -- this is not proper error handling! */
if ( new_kernel == (KernelInfo *) NULL ) {
- FormatLocaleFile(stderr, "Failed to parse kernel number #%.20g\n",
+ (void) FormatLocaleFile(stderr, "Failed to parse kernel number #%.20g\n",
(double) kernel_number);
if ( kernel != (KernelInfo *) NULL )
kernel=DestroyKernelInfo(kernel);
channel, kernel, exception);
if ( verbose == MagickTrue )
- (void) FormatLocaleFile(stderr,
+ (void) (void) FormatLocaleFile(stderr,
"%s:%.20g.%.20g #%.20g => Changed %.20g\n",
CommandOptionToMnemonic(MagickMorphologyOptions, method),
1.0,0.0,1.0, (double) changed);
if ( verbose == MagickTrue ) {
if ( kernel_loop > 1 )
- FormatLocaleFile(stderr, "\n"); /* add end-of-line from previous */
- (void) FormatLocaleFile(stderr,
+ (void) FormatLocaleFile(stderr, "\n"); /* add end-of-line from previous */
+ (void) (void) FormatLocaleFile(stderr,
"%s%s%s:%.20g.%.20g #%.20g => Changed %.20g",
v_info,CommandOptionToMnemonic(MagickMorphologyOptions,
primitive),(this_kernel == rflt_kernel ) ? "*" : "",
} /* End Loop 4: Iterate the kernel with primitive */
if ( verbose == MagickTrue && kernel_changed != (size_t)changed )
- FormatLocaleFile(stderr, " Total %.20g",(double) kernel_changed);
+ (void) FormatLocaleFile(stderr, " Total %.20g",(double) kernel_changed);
if ( verbose == MagickTrue && stage_loop < stage_limit )
- FormatLocaleFile(stderr, "\n"); /* add end-of-line before looping */
+ (void) FormatLocaleFile(stderr, "\n"); /* add end-of-line before looping */
#if 0
- FormatLocaleFile(stderr, "--E-- image=0x%lx\n", (unsigned long)image);
- FormatLocaleFile(stderr, " curr =0x%lx\n", (unsigned long)curr_image);
- FormatLocaleFile(stderr, " work =0x%lx\n", (unsigned long)work_image);
- FormatLocaleFile(stderr, " save =0x%lx\n", (unsigned long)save_image);
- FormatLocaleFile(stderr, " union=0x%lx\n", (unsigned long)rslt_image);
+ (void) FormatLocaleFile(stderr, "--E-- image=0x%lx\n", (unsigned long)image);
+ (void) FormatLocaleFile(stderr, " curr =0x%lx\n", (unsigned long)curr_image);
+ (void) FormatLocaleFile(stderr, " work =0x%lx\n", (unsigned long)work_image);
+ (void) FormatLocaleFile(stderr, " save =0x%lx\n", (unsigned long)save_image);
+ (void) FormatLocaleFile(stderr, " union=0x%lx\n", (unsigned long)rslt_image);
#endif
} /* End Loop 3: Primative (staging) Loop for Coumpound Methods */
case TopHatMorphology:
case BottomHatMorphology:
if ( verbose == MagickTrue )
- FormatLocaleFile(stderr, "\n%s: Difference with original image",
+ (void) FormatLocaleFile(stderr, "\n%s: Difference with original image",
CommandOptionToMnemonic(MagickMorphologyOptions, method) );
(void) CompositeImageChannel(curr_image,
(ChannelType) (channel & ~SyncChannels),
break;
case EdgeMorphology:
if ( verbose == MagickTrue )
- FormatLocaleFile(stderr, "\n%s: Difference of Dilate and Erode",
+ (void) FormatLocaleFile(stderr, "\n%s: Difference of Dilate and Erode",
CommandOptionToMnemonic(MagickMorphologyOptions, method) );
(void) CompositeImageChannel(curr_image,
(ChannelType) (channel & ~SyncChannels),
else if ( rslt_compose == NoCompositeOp )
{ if ( verbose == MagickTrue ) {
if ( this_kernel->next != (KernelInfo *) NULL )
- FormatLocaleFile(stderr, " (re-iterate)");
+ (void) FormatLocaleFile(stderr, " (re-iterate)");
else
- FormatLocaleFile(stderr, " (done)");
+ (void) FormatLocaleFile(stderr, " (done)");
}
rslt_image = curr_image; /* return result, and re-iterate */
}
else if ( rslt_image == (Image *) NULL)
{ if ( verbose == MagickTrue )
- FormatLocaleFile(stderr, " (save for compose)");
+ (void) FormatLocaleFile(stderr, " (save for compose)");
rslt_image = curr_image;
curr_image = (Image *) image; /* continue with original image */
}
** IE: Turn off SVG composition 'alpha blending'.
*/
if ( verbose == MagickTrue )
- FormatLocaleFile(stderr, " (compose \"%s\")",
+ (void) FormatLocaleFile(stderr, " (compose \"%s\")",
CommandOptionToMnemonic(MagickComposeOptions, rslt_compose) );
(void) CompositeImageChannel(rslt_image,
(ChannelType) (channel & ~SyncChannels), rslt_compose,
curr_image = (Image *) image; /* continue with original image */
}
if ( verbose == MagickTrue )
- FormatLocaleFile(stderr, "\n");
+ (void) FormatLocaleFile(stderr, "\n");
/* loop to the next kernel in a multi-kernel list */
norm_kernel = norm_kernel->next;
#if 0
/* For Debugging Geometry Input */
- FormatLocaleFile(stderr, "Geometry = 0x%04X : %lg x %lg %+lg %+lg\n",
+ (void) FormatLocaleFile(stderr, "Geometry = 0x%04X : %lg x %lg %+lg %+lg\n",
flags, args.rho, args.sigma, args.xi, args.psi );
#endif
for (c=0, k=kernel; k != (KernelInfo *) NULL; c++, k=k->next ) {
- FormatLocaleFile(stderr, "Kernel");
+ (void) FormatLocaleFile(stderr, "Kernel");
if ( kernel->next != (KernelInfo *) NULL )
- FormatLocaleFile(stderr, " #%lu", (unsigned long) c );
- FormatLocaleFile(stderr, " \"%s",
+ (void) FormatLocaleFile(stderr, " #%lu", (unsigned long) c );
+ (void) FormatLocaleFile(stderr, " \"%s",
CommandOptionToMnemonic(MagickKernelOptions, k->type) );
if ( fabs(k->angle) > MagickEpsilon )
- FormatLocaleFile(stderr, "@%lg", k->angle);
- FormatLocaleFile(stderr, "\" of size %lux%lu%+ld%+ld",(unsigned long)
+ (void) FormatLocaleFile(stderr, "@%lg", k->angle);
+ (void) FormatLocaleFile(stderr, "\" of size %lux%lu%+ld%+ld",(unsigned long)
k->width,(unsigned long) k->height,(long) k->x,(long) k->y);
- FormatLocaleFile(stderr,
+ (void) FormatLocaleFile(stderr,
" with values from %.*lg to %.*lg\n",
GetMagickPrecision(), k->minimum,
GetMagickPrecision(), k->maximum);
- FormatLocaleFile(stderr, "Forming a output range from %.*lg to %.*lg",
+ (void) FormatLocaleFile(stderr, "Forming a output range from %.*lg to %.*lg",
GetMagickPrecision(), k->negative_range,
GetMagickPrecision(), k->positive_range);
if ( fabs(k->positive_range+k->negative_range) < MagickEpsilon )
- FormatLocaleFile(stderr, " (Zero-Summing)\n");
+ (void) FormatLocaleFile(stderr, " (Zero-Summing)\n");
else if ( fabs(k->positive_range+k->negative_range-1.0) < MagickEpsilon )
- FormatLocaleFile(stderr, " (Normalized)\n");
+ (void) FormatLocaleFile(stderr, " (Normalized)\n");
else
- FormatLocaleFile(stderr, " (Sum %.*lg)\n",
+ (void) FormatLocaleFile(stderr, " (Sum %.*lg)\n",
GetMagickPrecision(), k->positive_range+k->negative_range);
for (i=v=0; v < k->height; v++) {
- FormatLocaleFile(stderr, "%2lu:", (unsigned long) v );
+ (void) FormatLocaleFile(stderr, "%2lu:", (unsigned long) v );
for (u=0; u < k->width; u++, i++)
if ( IsNan(k->values[i]) )
- FormatLocaleFile(stderr," %*s", GetMagickPrecision()+3, "nan");
+ (void) FormatLocaleFile(stderr," %*s", GetMagickPrecision()+3, "nan");
else
- FormatLocaleFile(stderr," %*.*lg", GetMagickPrecision()+3,
+ (void) FormatLocaleFile(stderr," %*.*lg", GetMagickPrecision()+3,
GetMagickPrecision(), k->values[i]);
- FormatLocaleFile(stderr,"\n");
+ (void) FormatLocaleFile(stderr,"\n");
}
}
}
}
#if DEBUG_ELLIPSE
- FormatLocaleFile(stderr, "u0=%lf; v0=%lf;\n", u0, v0);
+ (void) FormatLocaleFile(stderr, "u0=%lf; v0=%lf;\n", u0, v0);
#endif
/*
uw = (ssize_t)(2.0*resample_filter->Uwidth)+1;
#if DEBUG_ELLIPSE
- FormatLocaleFile(stderr, "v1=%ld; v2=%ld\n", (long)v1, (long)v2);
- FormatLocaleFile(stderr, "u1=%ld; uw=%ld\n", (long)u1, (long)uw);
+ (void) FormatLocaleFile(stderr, "v1=%ld; v2=%ld\n", (long)v1, (long)v2);
+ (void) FormatLocaleFile(stderr, "u1=%ld; uw=%ld\n", (long)u1, (long)uw);
#else
# define DEBUG_HIT_MISS 0 /* only valid if DEBUG_ELLIPSE is enabled */
#endif
for( v=v1; v<=v2; v++ ) {
#if DEBUG_HIT_MISS
long uu = ceil(u1); /* actual pixel location (for debug only) */
- FormatLocaleFile(stderr, "# scan line from pixel %ld, %ld\n", (long)uu, (long)v);
+ (void) FormatLocaleFile(stderr, "# scan line from pixel %ld, %ld\n", (long)uu, (long)v);
#endif
u = (ssize_t)ceil(u1); /* first pixel in scanline */
u1 += resample_filter->slope; /* start of next scan line */
hit++;
#if DEBUG_HIT_MISS
/* mark the pixel according to hit/miss of the ellipse */
- FormatLocaleFile(stderr, "set arrow from %lf,%lf to %lf,%lf nohead ls 3\n",
+ (void) FormatLocaleFile(stderr, "set arrow from %lf,%lf to %lf,%lf nohead ls 3\n",
(long)uu-.1,(double)v-.1,(long)uu+.1,(long)v+.1);
- FormatLocaleFile(stderr, "set arrow from %lf,%lf to %lf,%lf nohead ls 3\n",
+ (void) FormatLocaleFile(stderr, "set arrow from %lf,%lf to %lf,%lf nohead ls 3\n",
(long)uu+.1,(double)v-.1,(long)uu-.1,(long)v+.1);
} else {
- FormatLocaleFile(stderr, "set arrow from %lf,%lf to %lf,%lf nohead ls 1\n",
+ (void) FormatLocaleFile(stderr, "set arrow from %lf,%lf to %lf,%lf nohead ls 1\n",
(long)uu-.1,(double)v-.1,(long)uu+.1,(long)v+.1);
- FormatLocaleFile(stderr, "set arrow from %lf,%lf to %lf,%lf nohead ls 1\n",
+ (void) FormatLocaleFile(stderr, "set arrow from %lf,%lf to %lf,%lf nohead ls 1\n",
(long)uu+.1,(double)v-.1,(long)uu-.1,(long)v+.1);
}
uu++;
}
}
#if DEBUG_ELLIPSE
- FormatLocaleFile(stderr, "Hit=%ld; Total=%ld;\n", (long)hit, (long)uw*(v2-v1) );
+ (void) FormatLocaleFile(stderr, "Hit=%ld; Total=%ld;\n", (long)hit, (long)uw*(v2-v1) );
#endif
/*
return; /* EWA turned off - nothing to do */
#if DEBUG_ELLIPSE
- FormatLocaleFile(stderr, "# -----\n" );
- FormatLocaleFile(stderr, "dux=%lf; dvx=%lf; duy=%lf; dvy=%lf;\n",
+ (void) FormatLocaleFile(stderr, "# -----\n" );
+ (void) FormatLocaleFile(stderr, "dux=%lf; dvx=%lf; duy=%lf; dvy=%lf;\n",
dux, dvx, duy, dvy);
#endif
major_x *= major_mag; major_y *= major_mag;
minor_x *= minor_mag; minor_y *= minor_mag;
#if DEBUG_ELLIPSE
- FormatLocaleFile(stderr, "major_x=%lf; major_y=%lf; minor_x=%lf; minor_y=%lf;\n",
+ (void) FormatLocaleFile(stderr, "major_x=%lf; major_y=%lf; minor_x=%lf; minor_y=%lf;\n",
major_x, major_y, minor_x, minor_y);
#endif
A = major_y*major_y+minor_y*minor_y;
#endif
#if DEBUG_ELLIPSE
- FormatLocaleFile(stderr, "A=%lf; B=%lf; C=%lf; F=%lf\n", A,B,C,F);
+ (void) FormatLocaleFile(stderr, "A=%lf; B=%lf; C=%lf; F=%lf\n", A,B,C,F);
/* Figure out the various information directly about the ellipse.
This information currently not needed at this time, but may be
Major = sqrt(2*F/(alpha - gamma));
Minor = sqrt(2*F/(alpha + gamma));
- FormatLocaleFile(stderr, "# Major=%lf; Minor=%lf\n", Major, Minor );
+ (void) FormatLocaleFile(stderr, "# Major=%lf; Minor=%lf\n", Major, Minor );
/* other information about ellipse include... */
Eccentricity = Major/Minor;
Ellipse_Area = MagickPI*Major*Minor;
Ellipse_Angle = atan2(B, A-C);
- FormatLocaleFile(stderr, "# Angle=%lf Area=%lf\n",
+ (void) FormatLocaleFile(stderr, "# Angle=%lf Area=%lf\n",
RadiansToDegrees(Ellipse_Angle), Ellipse_Area);
}
#endif
resample_filter->slope = -B/(2.0*A); /* Reciprocal slope of the parallelogram */
#if DEBUG_ELLIPSE
- FormatLocaleFile(stderr, "Ulimit=%lf; Vlimit=%lf; UWidth=%lf; Slope=%lf;\n",
+ (void) FormatLocaleFile(stderr, "Ulimit=%lf; Vlimit=%lf; UWidth=%lf; Slope=%lf;\n",
resample_filter->Ulimit, resample_filter->Vlimit,
resample_filter->Uwidth, resample_filter->slope );
#endif