Changeset 3881
- Timestamp:
- 03/17/11 08:14:06 (2 years ago)
- Location:
- ImageMagick/trunk
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
magick/composite.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ImageMagick/trunk/ChangeLog
r3877 r3881 1 2011-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 1 6 2011-03-14 6.6.8-5 Glenn Randers-Pehrson <glennrp@image...> 2 7 * Fixed a rounding/truncation error while writing the pHYs chunk in the -
ImageMagick/trunk/magick/composite.c
r3824 r3881 1731 1731 return(MagickFalse); 1732 1732 } 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; 1737 1736 blur.x2=0.0; 1738 1737 blur.y1=0.0; 1739 blur.y2= 1.0;1738 blur.y2=geometry_info.sigma; 1740 1739 angle_start=0.0; 1741 1740 angle_range=0.0; … … 1748 1747 1749 1748 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); 1754 1753 } 1755 1754 if ((flags & YValue) != 0 ) … … 1795 1794 for (x=0; x < (ssize_t) composite_image->columns; x++) 1796 1795 { 1797 MagickRealType1798 b,1799 h,1800 w;1801 1802 1796 if (((x_offset+x) < 0) || ((x_offset+x) >= (ssize_t) image->columns)) 1803 1797 { … … 1805 1799 continue; 1806 1800 } 1807 /* if w or h blurs are getting too small,1808 * adjust the filter sigma, rather than the ellipse1809 */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 else1816 b = 1.0;1817 /* rotate the ellipse */1818 1801 if (fabs(angle_range) > MagickEpsilon) 1819 1802 { … … 1823 1806 angle=angle_start+angle_range*QuantumScale* 1824 1807 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); 1830 1812 } 1831 S etResampleFilter(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)); 1834 1816 (void) ResamplePixelColor(resample_filter,(double) x_offset+x, 1835 1817 (double) y_offset+y,&pixel);
Note: See TracChangeset
for help on using the changeset viewer.
