" break;\n"
" }\n"
" }\n"
- " gamma=MagickReciprocal(gamma);\n"
+ " gamma=MagickEpsilonReciprocal(gamma);\n"
" const unsigned long index = y*columns+x;\n"
" output[index].x=ClampToQuantum(gamma*sum.x);\n"
" output[index].y=ClampToQuantum(gamma*sum.y);\n"
gamma=DisplayGamma;
value=GetImageProperty(image,"gamma",exception);
if (value != (const char *) NULL)
- gamma=MagickReciprocal(StringToDouble(value,(char **) NULL));
+ gamma=MagickEpsilonReciprocal(StringToDouble(value,(char **) NULL));
film_gamma=FilmGamma;
value=GetImageProperty(image,"film-gamma",exception);
if (value != (const char *) NULL)
gamma=DisplayGamma;
value=GetImageProperty(image,"gamma",exception);
if (value != (const char *) NULL)
- gamma=MagickReciprocal(StringToDouble(value,(char **) NULL));
+ gamma=MagickEpsilonReciprocal(StringToDouble(value,(char **) NULL));
film_gamma=FilmGamma;
value=GetImageProperty(image,"film-gamma",exception);
if (value != (const char *) NULL)
channel=GetPixelChannelMapChannel(image,i);
gamma=image_statistics[i].standard_deviation*
reconstruct_statistics[channel].standard_deviation;
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
distortion[i]=QuantumRange*gamma*distortion[i];
distortion[CompositePixelChannel]+=distortion[i]*distortion[i];
}
Sa=QuantumScale*alpha;
Da=QuantumScale*beta,
gamma=Sa*(-Da)+Sa+Da;
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
{
PixelChannel
Da=QuantumScale*beta,
gamma=Sa*(-Da)+Sa+Da;
composite->alpha=(MagickRealType) QuantumRange*gamma;
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
composite->red=gamma*MagickOver_(p->red,alpha,q->red,beta);
composite->green=gamma*MagickOver_(p->green,alpha,q->green,beta);
composite->blue=gamma*MagickOver_(p->blue,alpha,q->blue,beta);
Da=QuantumScale*beta;
gamma=RoundToUnity(Sa+Da); /* 'Plus' blending -- not 'Over' blending */
composite->alpha=(MagickRealType) QuantumRange*gamma;
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
composite->red=gamma*(Sa*p->red+Da*q->red);
composite->green=gamma*(Sa*p->green+Da*q->green);
composite->blue=gamma*(Sa*p->blue+Da*q->blue);
*/
Sc=(MagickRealType) GetPixelChannel(composite_image,channel,p);
Dc=(MagickRealType) q[i];
- gamma=MagickReciprocal(alpha);
+ gamma=MagickEpsilonReciprocal(alpha);
q[i]=ClampToQuantum(gamma*(Sa*Sc-Sa*Da*Dc+Da*Dc));
}
p+=GetPixelChannels(composite_image);
default:
break;
}
- gamma=MagickReciprocal(alpha);
+ gamma=MagickEpsilonReciprocal(alpha);
pixel=Dc;
switch (compose)
{
s.x = (double) image->page.x;
s.y = (double) image->page.y;
scale=inverse[6]*s.x+inverse[7]*s.y+1.0;
- scale=MagickReciprocal(scale);
+ scale=MagickEpsilonReciprocal(scale);
d.x = scale*(inverse[0]*s.x+inverse[1]*s.y+inverse[2]);
d.y = scale*(inverse[3]*s.x+inverse[4]*s.y+inverse[5]);
InitalBounds(d);
s.x = (double) image->page.x+image->columns;
s.y = (double) image->page.y;
scale=inverse[6]*s.x+inverse[7]*s.y+1.0;
- scale=MagickReciprocal(scale);
+ scale=MagickEpsilonReciprocal(scale);
d.x = scale*(inverse[0]*s.x+inverse[1]*s.y+inverse[2]);
d.y = scale*(inverse[3]*s.x+inverse[4]*s.y+inverse[5]);
ExpandBounds(d);
s.x = (double) image->page.x;
s.y = (double) image->page.y+image->rows;
scale=inverse[6]*s.x+inverse[7]*s.y+1.0;
- scale=MagickReciprocal(scale);
+ scale=MagickEpsilonReciprocal(scale);
d.x = scale*(inverse[0]*s.x+inverse[1]*s.y+inverse[2]);
d.y = scale*(inverse[3]*s.x+inverse[4]*s.y+inverse[5]);
ExpandBounds(d);
s.x = (double) image->page.x+image->columns;
s.y = (double) image->page.y+image->rows;
scale=inverse[6]*s.x+inverse[7]*s.y+1.0;
- scale=MagickReciprocal(scale);
+ scale=MagickEpsilonReciprocal(scale);
d.x = scale*(inverse[0]*s.x+inverse[1]*s.y+inverse[2]);
d.y = scale*(inverse[3]*s.x+inverse[4]*s.y+inverse[5]);
ExpandBounds(d);
q.y=(double) y-gradient_vector->y1;
length=sqrt(q.x*q.x+q.y*q.y);
gamma=sqrt(p.x*p.x+p.y*p.y)*length;
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
scale=p.x*q.x+p.y*q.y;
offset=gamma*scale*length;
return(offset);
pixels+=GetPixelChannels(image);
}
}
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
SetPixelChannel(blur_image,channel,ClampToQuantum(gamma*pixel),q);
continue;
}
pixels+=GetPixelChannels(image);
}
}
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
SetPixelChannel(blur_image,channel,ClampToQuantum(gamma*pixel),q);
}
q+=GetPixelChannels(blur_image);
pixels+=GetPixelChannels(image);
}
}
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
SetPixelChannel(sharp_image,channel,ClampToQuantum(gamma*pixel),q);
continue;
}
pixels+=GetPixelChannels(image);
}
}
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
SetPixelChannel(sharp_image,channel,ClampToQuantum(gamma*pixel),q);
}
q+=GetPixelChannels(sharp_image);
k++;
pixels+=GetPixelChannels(image);
}
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
SetPixelChannel(blur_image,channel,ClampToQuantum(gamma*pixel),q);
}
p+=GetPixelChannels(image);
k++;
pixels+=GetPixelChannels(blur_image);
}
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
SetPixelChannel(blur_image,channel,ClampToQuantum(gamma*pixel),q);
}
p+=GetPixelChannels(blur_image);
gamma+=(*k)*alpha;
k++;
}
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
SetPixelChannel(blur_image,channel,ClampToQuantum(gamma*pixel),q);
}
p+=GetPixelChannels(image);
pixel+=r[i];
gamma++;
}
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
SetPixelChannel(blur_image,channel,ClampToQuantum(gamma*pixel),q);
continue;
}
pixel+=GetPixelAlpha(image,r)*r[i];
gamma+=GetPixelAlpha(image,r);
}
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
SetPixelChannel(blur_image,channel,ClampToQuantum(gamma*pixel),q);
}
p+=GetPixelChannels(image);
SetPixelChannel(blur_image,channel,p[center+i],q);
continue;
}
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
SetPixelChannel(blur_image,channel,ClampToQuantum(gamma*pixel),q);
continue;
}
SetPixelChannel(blur_image,channel,p[center+i],q);
continue;
}
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
SetPixelChannel(blur_image,channel,ClampToQuantum(gamma*pixel),q);
}
p+=GetPixelChannels(image);
break;
}
}
- normalize=MagickReciprocal(normalize);
+ normalize=MagickEpsilonReciprocal(normalize);
for (y=0; y < (ssize_t) number_grays; y++)
{
register ssize_t
Sa=QuantumScale*alpha;
Da=QuantumScale*beta,
gamma=Sa*(-Da)+Sa+Da;
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
{
PixelChannel
extern "C" {
#endif
-static inline MagickRealType MagickReciprocal(const MagickRealType x)
+static inline MagickRealType MagickEpsilonReciprocal(const MagickRealType x)
{
return((MagickRealType) 1.0/(((x) > (MagickRealType) 0.0 ? (x) : -(x)) <
MagickEpsilon ? MagickEpsilon : x));
}
for (i=0; i < 16; i++)
{
- gamma=MagickReciprocal(alpha[i]);
+ gamma=MagickEpsilonReciprocal(alpha[i]);
*pixel+=gamma*0.0625*pixels[i];
}
break;
*/
gamma=1.0;
if (channel != AlphaPixelChannel)
- gamma=MagickReciprocal(cy[0]*(cx[0]*alpha[0]+cx[1]*alpha[1]+cx[2]*
+ gamma=MagickEpsilonReciprocal(cy[0]*(cx[0]*alpha[0]+cx[1]*alpha[1]+cx[2]*
alpha[2]+cx[3]*alpha[3])+cy[1]*(cx[0]*alpha[4]+cx[1]*alpha[5]+
cx[2]*alpha[6]+cx[3]*alpha[7])+cy[2]*(cx[0]*alpha[8]+
cx[1]*alpha[9]+cx[2]*alpha[10]+cx[3]*alpha[11])+cy[3]*(
epsilon.y=1.0-delta.y;
gamma=((epsilon.y*(epsilon.x*alpha[0]+delta.x*alpha[1])+delta.y*
(epsilon.x*alpha[2]+delta.x*alpha[3])));
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
*pixel=gamma*(epsilon.y*(epsilon.x*pixels[0]+delta.x*pixels[1])+delta.y*
(epsilon.x*pixels[2]+delta.x*pixels[3]));
break;
*/
delta.y=1.0-delta.y;
gamma=MeshInterpolate(&delta,alpha[2],alpha[3],alpha[0]);
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
*pixel=gamma*MeshInterpolate(&delta,pixels[2],pixels[3],
pixels[0]);
}
*/
delta.x=1.0-delta.x;
gamma=MeshInterpolate(&delta,alpha[1],alpha[0],alpha[3]);
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
*pixel=gamma*MeshInterpolate(&delta,pixels[1],pixels[0],
pixels[3]);
}
Top-left triangle (pixel: 0, diagonal: 1-2).
*/
gamma=MeshInterpolate(&delta,alpha[0],alpha[1],alpha[2]);
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
*pixel=gamma*MeshInterpolate(&delta,pixels[0],pixels[1],
pixels[2]);
}
delta.x=1.0-delta.x;
delta.y=1.0-delta.y;
gamma=MeshInterpolate(&delta,alpha[3],alpha[2],alpha[1]);
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
*pixel=gamma*MeshInterpolate(&delta,pixels[3],pixels[2],
pixels[1]);
}
for (j=(-1); j < 3L; j++)
{
dx=CubicWeightingFunction(delta.x-(MagickRealType) j);
- gamma=MagickReciprocal(alpha[n]);
+ gamma=MagickEpsilonReciprocal(alpha[n]);
*pixel+=gamma*dx*dy*pixels[n];
n++;
}
alpha[j]=QuantumScale*GetPixelAlpha(source,p+j*
GetPixelChannels(source));
pixels[j]*=alpha[j];
- gamma=MagickReciprocal(alpha[j]);
+ gamma=MagickEpsilonReciprocal(alpha[j]);
sum+=gamma*0.0625*pixels[j];
}
SetPixelChannel(destination,channel,ClampToQuantum(sum),pixel);
*/
gamma=1.0;
if ((traits & BlendPixelTrait) == 0)
- gamma=MagickReciprocal(cy[0]*(cx[0]*alpha[0]+cx[1]*alpha[1]+cx[2]*
+ gamma=MagickEpsilonReciprocal(cy[0]*(cx[0]*alpha[0]+cx[1]*alpha[1]+cx[2]*
alpha[2]+cx[3]*alpha[3])+cy[1]*(cx[0]*alpha[4]+cx[1]*alpha[5]+
cx[2]*alpha[6]+cx[3]*alpha[7])+cy[2]*(cx[0]*alpha[8]+
cx[1]*alpha[9]+cx[2]*alpha[10]+cx[3]*alpha[11])+cy[3]*(
if ((traits & BlendPixelTrait) == 0)
{
gamma=((epsilon.y*(epsilon.x+delta.x)+delta.y*(epsilon.x+delta.x)));
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
SetPixelChannel(destination,channel,ClampToQuantum(gamma*(epsilon.y*
(epsilon.x*pixels[0]+delta.x*pixels[1])+delta.y*(epsilon.x*
pixels[2]+delta.x*pixels[3]))),pixel);
pixels[3]*=alpha[3];
gamma=((epsilon.y*(epsilon.x*alpha[0]+delta.x*alpha[1])+delta.y*
(epsilon.x*alpha[2]+delta.x*alpha[3])));
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
SetPixelChannel(destination,channel,ClampToQuantum(gamma*(epsilon.y*
(epsilon.x*pixels[0]+delta.x*pixels[1])+delta.y*(epsilon.x*pixels[2]+
delta.x*pixels[3]))),pixel);
*/
delta.y=1.0-delta.y;
gamma=MeshInterpolate(&delta,alpha[2],alpha[3],alpha[0]);
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
SetPixelChannel(destination,channel,ClampToQuantum(gamma*
MeshInterpolate(&delta,pixels[2],pixels[3],pixels[0])),pixel);
}
*/
delta.x=1.0-delta.x;
gamma=MeshInterpolate(&delta,alpha[1],alpha[0],alpha[3]);
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
SetPixelChannel(destination,channel,ClampToQuantum(gamma*
MeshInterpolate(&delta,pixels[1],pixels[0],pixels[3])),pixel);
}
Top-left triangle (pixel: 0, diagonal: 1-2).
*/
gamma=MeshInterpolate(&delta,alpha[0],alpha[1],alpha[2]);
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
SetPixelChannel(destination,channel,ClampToQuantum(gamma*
MeshInterpolate(&delta,pixels[0],pixels[1],pixels[2])),pixel);
}
delta.x=1.0-delta.x;
delta.y=1.0-delta.y;
gamma=MeshInterpolate(&delta,alpha[3],alpha[2],alpha[1]);
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
SetPixelChannel(destination,channel,ClampToQuantum(gamma*
MeshInterpolate(&delta,pixels[3],pixels[2],pixels[1])),pixel);
}
for (k=(-1); k < 3L; k++)
{
dx=CubicWeightingFunction(delta.x-(MagickRealType) k);
- gamma=MagickReciprocal(alpha[n]);
+ gamma=MagickEpsilonReciprocal(alpha[n]);
sum+=gamma*dx*dy*pixels[n];
n++;
}
pixel->alpha=0.0;
for (i=0; i < 16L; i++)
{
- gamma=MagickReciprocal(alpha[i]);
+ gamma=MagickEpsilonReciprocal(alpha[i]);
pixel->red+=gamma*0.0625*pixels[i].red;
pixel->green+=gamma*0.0625*pixels[i].green;
pixel->blue+=gamma*0.0625*pixels[i].blue;
epsilon.y=1.0-delta.y;
gamma=((epsilon.y*(epsilon.x*alpha[0]+delta.x*alpha[1])+delta.y*
(epsilon.x*alpha[2]+delta.x*alpha[3])));
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
pixel->red=gamma*(epsilon.y*(epsilon.x*pixels[0].red+delta.x*
pixels[1].red)+delta.y*(epsilon.x*pixels[2].red+delta.x*pixels[3].red));
pixel->green=gamma*(epsilon.y*(epsilon.x*pixels[0].green+delta.x*
pixels[1].black)+delta.y*(epsilon.x*pixels[2].black+delta.x*
pixels[3].black));
gamma=((epsilon.y*(epsilon.x+delta.x)+delta.y*(epsilon.x+delta.x)));
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
pixel->alpha=(epsilon.y*(epsilon.x*pixels[0].alpha+delta.x*
pixels[1].alpha)+delta.y*(epsilon.x*pixels[2].alpha+delta.x*
pixels[3].alpha));
*/
delta.y=1.0-delta.y;
gamma=MeshInterpolate(&delta,alpha[2],alpha[3],alpha[0]);
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
pixel->red=gamma*MeshInterpolate(&delta,pixels[2].red,
pixels[3].red,pixels[0].red);
pixel->green=gamma*MeshInterpolate(&delta,pixels[2].green,
*/
delta.x=1.0-delta.x;
gamma=MeshInterpolate(&delta,alpha[1],alpha[0],alpha[3]);
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
pixel->red=gamma*MeshInterpolate(&delta,pixels[1].red,
pixels[0].red,pixels[3].red);
pixel->green=gamma*MeshInterpolate(&delta,pixels[1].green,
Top-left triangle (pixel: 0, diagonal: 1-2).
*/
gamma=MeshInterpolate(&delta,alpha[0],alpha[1],alpha[2]);
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
pixel->red=gamma*MeshInterpolate(&delta,pixels[0].red,
pixels[1].red,pixels[2].red);
pixel->green=gamma*MeshInterpolate(&delta,pixels[0].green,
delta.x=1.0-delta.x;
delta.y=1.0-delta.y;
gamma=MeshInterpolate(&delta,alpha[3],alpha[2],alpha[1]);
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
pixel->red=gamma*MeshInterpolate(&delta,pixels[3].red,
pixels[2].red,pixels[1].red);
pixel->green=gamma*MeshInterpolate(&delta,pixels[3].green,
for (j=(-1); j < 3L; j++)
{
dx=CubicWeightingFunction(delta.x-(MagickRealType) j);
- gamma=MagickReciprocal(alpha[n]);
+ gamma=MagickEpsilonReciprocal(alpha[n]);
pixel->red+=gamma*dx*dy*pixels[n].red;
pixel->green+=gamma*dx*dy*pixels[n].green;
pixel->blue+=gamma*dx*dy*pixels[n].blue;
*/
q=image->colormap+image->colors;
alpha=(MagickRealType) ((MagickOffsetType) node_info->number_unique);
- alpha=MagickReciprocal(alpha);
+ alpha=MagickEpsilonReciprocal(alpha);
if (cube_info->associate_alpha == MagickFalse)
{
q->red=(double) ClampToQuantum((MagickRealType)
gamma;
gamma=(MagickRealType) (QuantumScale*q->alpha);
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
q->red=(double) ClampToQuantum((MagickRealType)
(alpha*gamma*QuantumRange*node_info->total_color.red));
q->green=(double) ClampToQuantum((MagickRealType)
continue;
}
Sa=QuantumScale*GetPixelAlpha(image,q);
- gamma=MagickReciprocal(Sa);
+ gamma=MagickEpsilonReciprocal(Sa);
for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
{
PixelChannel
pixel+=alpha*p[k*GetPixelChannels(image)+i];
gamma+=alpha;
}
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
SetPixelChannel(resize_image,channel,ClampToQuantum(gamma*pixel),q);
}
q+=GetPixelChannels(resize_image);
pixel+=alpha*p[k*GetPixelChannels(image)+i];
gamma+=alpha;
}
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
SetPixelChannel(resize_image,channel,ClampToQuantum(gamma*pixel),q);
}
q+=GetPixelChannels(resize_image);
}
alpha=QuantumScale*scanline[x*GetPixelChannels(image)+
GetPixelChannelMapChannel(image,AlphaPixelChannel)];
- gamma=MagickReciprocal(alpha);
+ gamma=MagickEpsilonReciprocal(alpha);
SetPixelChannel(scale_image,channel,ClampToQuantum(gamma*scanline[
x*GetPixelChannels(image)+offset]),q);
}
}
alpha=QuantumScale*scanline[x*GetPixelChannels(image)+
GetPixelChannelMapChannel(image,AlphaPixelChannel)];
- gamma=MagickReciprocal(alpha);
+ gamma=MagickEpsilonReciprocal(alpha);
SetPixelChannel(scale_image,channel,ClampToQuantum(gamma*
scale_scanline[x*MaxPixelChannels+channel]),q);
}
Disassociate alpha.
*/
gamma=1.0-QuantumScale*fill_color.alpha;
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
fill_color.blue*=gamma;
fill_color.green*=gamma;
fill_color.red*=gamma;
gamma;
gamma=1.0-QuantumScale*fill_color.alpha;
- gamma=MagickReciprocal(gamma);
+ gamma=MagickEpsilonReciprocal(gamma);
fill_color.blue*=gamma;
fill_color.green*=gamma;
fill_color.red*=gamma;