-fx airy, j0, and j1 functions
Posted: 2010-03-01T14:08:22-07:00
I failed in my attempt to make changes local to my machine.
I am running ubuntu and libraries (specifically lperl) and other resources are not where they ought to be.
May I ask for the code proposed below to be inserted and made available for ubuntu packages?
Here are the changes needed in "magick/fx.c" function MagickRealType FxEvaluateSubexpression.
/********************************************/
case 'A':
case 'a':
/* abs and acos code */
if (LocaleNCompare(expression,"airy",4) == 0 )
{
alpha=FxEvaluateSubexpression(fx_info,channel,x,y,expression+3,beta,
exception);
MagickRealType half = (MagickRealType) 0.5;
MagickRealType zero = (MagickRealType) 0.0;
if( alpha == zero ) return half;
else return((MagickRealType) ( j0((double) alpha)) / (double) alpha);
}
/* asin, alt, and other following code */
/********************************************/
case 'J':
case 'j':
/* j code */
if (LocaleNCompare(expression,"j0",2) == 0 )
{
alpha=FxEvaluateSubexpression(fx_info,channel,x,y,expression+3,beta,
exception);
return((MagickRealType) j0((double) alpha));
}
if (LocaleNCompare(expression,"j1",2) == 0 )
{
alpha=FxEvaluateSubexpression(fx_info,channel,x,y,expression+3,beta,
exception);
return((MagickRealType) j1((double) alpha));
}
break;
I am running ubuntu and libraries (specifically lperl) and other resources are not where they ought to be.
May I ask for the code proposed below to be inserted and made available for ubuntu packages?
Here are the changes needed in "magick/fx.c" function MagickRealType FxEvaluateSubexpression.
/********************************************/
case 'A':
case 'a':
/* abs and acos code */
if (LocaleNCompare(expression,"airy",4) == 0 )
{
alpha=FxEvaluateSubexpression(fx_info,channel,x,y,expression+3,beta,
exception);
MagickRealType half = (MagickRealType) 0.5;
MagickRealType zero = (MagickRealType) 0.0;
if( alpha == zero ) return half;
else return((MagickRealType) ( j0((double) alpha)) / (double) alpha);
}
/* asin, alt, and other following code */
/********************************************/
case 'J':
case 'j':
/* j code */
if (LocaleNCompare(expression,"j0",2) == 0 )
{
alpha=FxEvaluateSubexpression(fx_info,channel,x,y,expression+3,beta,
exception);
return((MagickRealType) j0((double) alpha));
}
if (LocaleNCompare(expression,"j1",2) == 0 )
{
alpha=FxEvaluateSubexpression(fx_info,channel,x,y,expression+3,beta,
exception);
return((MagickRealType) j1((double) alpha));
}
break;