Changeset 13882 for trunk/admin/include
- Timestamp:
- Apr 3, 2012, 10:58:14 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/include/image.class.php
r13843 r13882 288 288 static function get_sharpen_matrix($amount) 289 289 { 290 // Amount should be in the range of 28-10 291 $amount = round(abs(-28 + ($amount * 0.18)), 2); 292 293 $matrix = array 294 ( 295 array(-1, -1, -1), 296 array(-1, $amount, -1), 297 array(-1, -1, -1), 298 ); 290 // Amount should be in the range of 28-10 291 $amount = round(abs(-28 + ($amount * 0.18)), 2); 292 293 $matrix = array( 294 array(-1, -1, -1), 295 array(-1, $amount, -1), 296 array(-1, -1, -1), 297 ); 299 298 300 299 $norm = array_sum(array_map('array_sum', $matrix)); … … 304 303 $line = & $matrix[$i]; 305 304 for ($j=0; $j<3; $j++) 305 { 306 306 $line[$j] /= $norm; 307 } 308 309 return $matrix; 307 } 308 } 309 310 return $matrix; 310 311 } 311 312 … … 461 462 { 462 463 $m = pwg_image::get_sharpen_matrix($amount); 463 464 return $this->image->convolveImage($m); 464 465 } 465 466 … … 730 731 { 731 732 $m = pwg_image::get_sharpen_matrix($amount); 732 733 return imageconvolution($this->image, $m, 1, 0); 733 734 } 734 735
Note: See TracChangeset
for help on using the changeset viewer.