note 72329 added to function.imagefilter

From: Date: Sun, 14 Jan 2007 14:55:15 +0000
Subject: note 72329 added to function.imagefilter
Groups: php.notes 
Request: Send a blank email to php-notes+get-121625@lists.php.net to get a copy of this message
The documentation misses the exact meaning and valid ranges of the arguments for ImageFilter(). According to the 5.2.0 sources the arguments are: IMG_FILTER_BRIGHTNESS -255 = min brightness, 0 = no change, +255 = max brightness IMG_FILTER_CONTRAST -100 = max contrast, 0 = no change, +100 = min contrast (note the direction!) IMG_FILTER_COLORIZE Adds (subtracts) specified RGB values to each pixel. The valid range for each color is -255...+255, not 0...255. The correct order is red, green, blue. -255 = min, 0 = no change, +255 = max This has not much to do with IMG_FILTER_GRAYSCALE. IMG_FILTER_SMOOTH Applies a 9-cell convolution matrix where center pixel has the weight arg1 and others weight of 1.0. The result is normalized by dividing the sum with arg1 + 8.0 (sum of the matrix). any float is accepted, large value (in practice: 2048 or more) = no change ImageFilter seem to return false if the argument(s) are out of range for the chosen filter. ---- Server IP: 62.237.7.3 Probable Submitter: 82.133.157.173 ---- Manual Page -- http://www.php.net/manual/en/function.imagefilter.php Edit -- https://master.php.net/note/edit/72329 Del: integrated -- https://master.php.net/note/delete/72329/integrated Del: useless -- https://master.php.net/note/delete/72329/useless Del: bad code -- https://master.php.net/note/delete/72329/bad+code Del: spam -- https://master.php.net/note/delete/72329/spam Del: non-english -- https://master.php.net/note/delete/72329/non-english Del: in docs -- https://master.php.net/note/delete/72329/in+docs Del: other reasons-- https://master.php.net/note/delete/72329 Reject -- https://master.php.net/note/reject/72329 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#121625) next »