Lines Matching refs:amount

161 	public function Brightness(&$gdimg, $amount=0) {  argument
162 if ($amount == 0) {
165 $amount = max(-255, min(255, $amount));
168 if (imagefilter($gdimg, IMG_FILTER_BRIGHTNESS, $amount)) {
171 …$this->DebugMessage('FAILED: imagefilter($gdimg, IMG_FILTER_BRIGHTNESS, '.$amount.')', __FILE__, _…
175 $scaling = (255 - abs($amount)) / 255;
176 $baseamount = (($amount > 0) ? $amount : 0);
192 public function Contrast(&$gdimg, $amount=0) { argument
193 if ($amount == 0) {
196 $amount = max(-255, min(255, $amount));
200 $amount = ($amount / 255) * -100;
201 if (imagefilter($gdimg, IMG_FILTER_CONTRAST, $amount)) {
204 …$this->DebugMessage('FAILED: imagefilter($gdimg, IMG_FILTER_CONTRAST, '.$amount.')', __FILE__, __L…
208 if ($amount > 0) {
209 $scaling = 1 + ($amount / 255);
211 $scaling = (255 - abs($amount)) / 255;
228 public function Colorize(&$gdimg, $amount, $targetColor) { argument
229 $amount = (is_numeric($amount) ? $amount : 25);
230 $amountPct = $amount / 100;
233 if ($amount == 0) {
267 …$NewPixel[$key] = round(max(0, min(255, ($OriginalPixel[$key] * ((100 - $amount) / 100)) + ($Targe…
306 public function Desaturate(&$gdimg, $amount, $color='') { argument
307 if ($amount == 0) {
310 …return $this->Colorize($gdimg, $amount, (phpthumb_functions::IsHexColor($color) ? $color : 'gray')…
507 public function Gamma(&$gdimg, $amount) { argument
508 if (number_format($amount, 4) == '1.0000') {
511 return imagegammacorrect($gdimg, 1.0, $amount);
921 public function Saturation(&$gdimg, $amount, $color='') { argument
922 if ($amount == 0) {
924 } elseif ($amount > 0) {
925 $amount = 0 - $amount;
927 $amount = abs($amount);
929 return $this->Desaturate($gdimg, $amount, $color);
933 public function Sepia(&$gdimg, $amount, $targetColor) { argument
934 $amount = (is_numeric($amount) ? max(0, min(100, $amount)) : 50);
935 $amountPct = $amount / 100;
938 if ($amount == 0) {
990 public function Smooth(&$gdimg, $amount=6) { argument
991 $amount = min(25, max(0, $amount));
992 if ($amount == 0) {
996 if (imagefilter($gdimg, IMG_FILTER_SMOOTH, $amount)) {
999 …$this->DebugMessage('FAILED: imagefilter($gdimg, IMG_FILTER_SMOOTH, '.$amount.')', __FILE__, __LIN…
1003 …$this->DebugMessage('FAILED: phpthumb_filters::Smooth($gdimg, '.$amount.') [function not implement…