Changeset 3881


Ignore:
Timestamp:
03/17/11 08:14:06 (2 years ago)
Author:
anthony
Message:

Backout the Variable Blur Compose Patch!

Location:
ImageMagick/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ImageMagick/trunk/ChangeLog

    r3877 r3881  
     12011-03-17 6.6.8-5 Anthony Thyssen <A.Thyssen@griffith...> 
     2  * Backed out the patch for Variable Blur Composition that was added 
     3    2011-02-13 v6.6.7-7, until I can re-think the problem. 
     4    The existing fix was failing to do circular blurs correctly. 
     5 
    162011-03-14  6.6.8-5 Glenn Randers-Pehrson <glennrp@image...> 
    27  * Fixed a rounding/truncation error while writing the pHYs chunk in the 
  • ImageMagick/trunk/magick/composite.c

    r3824 r3881  
    17311731          return(MagickFalse); 
    17321732        } 
    1733       /* Set up ellipse, Scales for blur map values */ 
    1734       width=geometry_info.rho*QuantumScale; 
    1735       height=geometry_info.sigma*QuantumScale; 
    1736       blur.x1=1.0; 
     1733      width=geometry_info.rho; 
     1734      height=geometry_info.sigma; 
     1735      blur.x1=geometry_info.rho; 
    17371736      blur.x2=0.0; 
    17381737      blur.y1=0.0; 
    1739       blur.y2=1.0; 
     1738      blur.y2=geometry_info.sigma; 
    17401739      angle_start=0.0; 
    17411740      angle_range=0.0; 
     
    17481747 
    17491748          angle=DegreesToRadians(geometry_info.xi); 
    1750           blur.x1=cos(angle); 
    1751           blur.x2=sin(angle); 
    1752           blur.y1=-sin(angle); 
    1753           blur.y2=cos(angle); 
     1749          blur.x1=width*cos(angle); 
     1750          blur.x2=width*sin(angle); 
     1751          blur.y1=(-height*sin(angle)); 
     1752          blur.y2=height*cos(angle); 
    17541753        } 
    17551754      if ((flags & YValue) != 0 ) 
     
    17951794        for (x=0; x < (ssize_t) composite_image->columns; x++) 
    17961795        { 
    1797           MagickRealType 
    1798             b, 
    1799             h, 
    1800             w; 
    1801  
    18021796          if (((x_offset+x) < 0) || ((x_offset+x) >= (ssize_t) image->columns)) 
    18031797            { 
     
    18051799              continue; 
    18061800            } 
    1807           /* if w or h blurs are getting too small, 
    1808            * adjust the filter sigma, rather than the ellipse 
    1809            */ 
    1810           w=width*GetRedPixelComponent(p); 
    1811           h=height*GetGreenPixelComponent(p); 
    1812           b=MagickMax(w,h) + MagickEpsilon; 
    1813           if ( b < 1.0 ) 
    1814             w /= b, h /= b; /* make sure ellipse does not get too small */ 
    1815           else 
    1816             b = 1.0; 
    1817           /* rotate the ellipse */ 
    18181801          if (fabs(angle_range) > MagickEpsilon) 
    18191802            { 
     
    18231806              angle=angle_start+angle_range*QuantumScale* 
    18241807                GetBluePixelComponent(p); 
    1825  
    1826               blur.x1=cos(angle); 
    1827               blur.x2=sin(angle); 
    1828               blur.y1=-sin(angle); 
    1829               blur.y2=cos(angle); 
     1808              blur.x1=width*cos(angle); 
     1809              blur.x2=width*sin(angle); 
     1810              blur.y1=(-height*sin(angle)); 
     1811              blur.y2=height*cos(angle); 
    18301812            } 
    1831           SetResampleFilter(resample_filter,GaussianFilter,2.0*b); 
    1832           ScaleResampleFilter(resample_filter,blur.x1*w,blur.y1*h, 
    1833                blur.x2*w,blur.y2*h); 
     1813          ScaleResampleFilter(resample_filter,blur.x1*QuantumScale*p->red, 
     1814            blur.y1*QuantumScale*p->green,blur.x2*QuantumScale*p->red, 
     1815            blur.y2*QuantumScale*GetGreenPixelComponent(p)); 
    18341816          (void) ResamplePixelColor(resample_filter,(double) x_offset+x, 
    18351817            (double) y_offset+y,&pixel); 
Note: See TracChangeset for help on using the changeset viewer.