Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

imagefilter

Description

The imagefilter of Image for PHP applies a filter to an image.

Syntax

imagefilter(
    GdImage $image,
    int $filter,
    array|int|float|bool ...$args
): bool

Parameters

image

A GdImage object, returned by one of the image creation functions, such as imagecreatetruecolor().

filter

ConstantDescription
IMG_FILTER_BRIGHTNESSChanges the brightness of the image. Use args to set the level of brightness. The range for the brightness is -255 to 255.
IMG_FILTER_COLORIZELike IMG_FILTER_GRAYSCALE, except you can specify the color. Use args, arg2 and arg3 in the form of red, green, blue and arg4 for the alpha channel. The range for each color is 0 to 255.
IMG_FILTER_CONTRASTChanges the contrast of the image. Use args to set the level of contrast. The range for the contrast is -100 to 100.
IMG_FILTER_EDGEDETECTUses edge detection to highlight the edges in the image.
IMG_FILTER_EMBOSSEmbosses the image.
IMG_FILTER_GAUSSIAN_BLURBlurs the image using the Gaussian method.
IMG_FILTER_GRAYSCALEConverts the image into grayscale by changing the red, green and blue components to their weighted sum using the same coefficients as the REC.601 luma (Y') calculation. The alpha components are retained. For palette images the result may differ due to palette limitations.
IMG_FILTER_MEAN_REMOVALUses mean removal to achieve a "sketchy" effect.
IMG_FILTER_NEGATEReverses all colors of the image.
IMG_FILTER_PIXELATEApplies pixelation effect to the image, use args to set the block size and arg2 to set the pixelation effect mode.
IMG_FILTER_SCATTERApplies scatter effect to the image, use args and arg2 to define the effect strength and additionally arg3 to only apply the on select pixel colors.
IMG_FILTER_SELECTIVE_BLURBlurs the image.
IMG_FILTER_SMOOTHMakes the image smoother. Use args to set the level of smoothness.

args

ConstantDescription
IMG_FILTER_BRIGHTNESSBrightness level.
IMG_FILTER_COLORIZEValue of red component.
IMG_FILTER_CONTRASTContrast level.
IMG_FILTER_PIXELATEBlock size in pixels.
IMG_FILTER_SCATTEREffect substraction level. This must not be higher or equal to the addition level set with arg2.
IMG_FILTER_SMOOTHSmoothness level.

arg2

ConstantDescription
IMG_FILTER_COLORIZEValue of green component.
IMG_FILTER_PIXELATEWhether to use advanced pixelation effect or not (defaults to false).
IMG_FILTER_SCATTEREffect addition level.

arg3

ConstantDescription
IMG_FILTER_COLORIZEValue of blue component.
IMG_FILTER_SCATTEROptional array indexed color values to apply effect at.

arg4

ConstantDescription
IMG_FILTER_COLORIZEAlpha channel, A value between 0 and 127. 0 indicates completely opaque while 127 indicates completely transparent.

Return

Returns true on success or false on failure.

Examples

1 · return

<?

$width = 100;
$height = 100;
$image = imagecreate($width, $height);

$filter = IMG_FILTER_EDGEDETECT;

$return = imagefilter($image, $filter);
    
var_export($return);

?>
true

2 · base64 · filter · IMG_FILTER_EDGEDETECT

<?

$filename = $_SERVER['DOCUMENT_ROOT'] . '/assets/png/Happy.png';
$image = imagecreatefrompng($filename);

$filter = IMG_FILTER_EDGEDETECT;
imagefilter($image, $filter);

ob_start();

    imagepng($image);

$output = ob_get_clean();

echo '<!doctype html>
<html>
<body>
    <img src="data:image/png;base64,' . base64_encode($output) . '">
</body>
</html>';

?>
<!doctype html>
<html>
<body>
    <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAIAAAD/gAIDAAAACXBIWXMAAAsTAAALEwEAmpwYAAAHW0lEQVR4nO2dTWsbRxjHfzZWbGpZriQ3qQkIY0FiO7RJKHUp9CghoxxiDD304Bx6yaU95Qs8XyC3fIMcSi6hPbgk2PfSQEloqV8KNqZQ7FDZiiWlKFEgPaylbLTSamd2Vm/W7ySk3Wdn/5p5dmfmmWeG3r59S2dIra2dK5XCQD4fBSqV0NHRVN1B8XguFKoA0WgeCIdLN268ho22lxZgqL1iZWAcPoQPISKiY0IEKMALeAEv4bHRErrRHrEyEINpbYGaURXuAI7boFqgYqUgAjPGNXJSVW0fCsE10oDEysAFmA1aIyciwB48D6KiGRerYzLZCUgyg2Kl4CO43FmZ7IgAO/CvqYZpSqwVuCQyZsKUYUTK8Bc89G/Kv1gZmIHp7qlQTkSAA9j32Sp9irUMc91ZoZyIlGEbftS24EesVUh2c4VyIgLswn290/XESsEcTPW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IXYN3yWRo+Xml+sNvQKHye6hu8UpyQRUJppV43kdGaWDqhKlZRdZxfBKNTs+1kUutmi1TF0nNb3iefuwe9aeoCrGPrSCuHw4qM9qDnimlNKZ6KUxMrrzXjVh/P293oxGKLUHsA1sR6pNESRUbhoupZneOiVrUqwCPrk727s69VggRktU5sM1nd6Ir92ie7WMrPRE5r6dWu9/QpuKp7d++6g3ax1r3F4zstjvoIiWkPCd1QkV3rOWhRN+pwqBtYkYBbemcGzy29/1IEOLR/UyeWduUCZt0XGHeIZR859d6rVjSasNCsXCLAtS7Taxmu+bidw7ovnWKtw46O+a7TS18pAHbqqhVNpsJy2uupqnp13H/d8qOUSLnhOpZmKaFW4FMfFwMOXMM+g8Pq/emHGIoAvzdMqDjS5JSHcFs7hlUEmBaJQRZ+1jOiRRY+9x1QetAs9aRLsrE0fOZzsbEI8Df8E3zi4wxchISJxaW/Ob2VhXtmtptw3cTi8oaRy6YwFqEsAjyFn5od0DKNnbGUkVXJTszVMmutvZlAbi+JJpv5rBr34TsjiY5ERmFBBPgWjh0h7N6xguljRlIq2Mi1TMnpJUFiGj4xnkKrGiL/HP6DSqvqloEQfAAXggh2FynAH81cVQ2P2SSX4FpweXyqN1+Al44fx63lfcGtBhApw7PaoJUL3lNvBqtXp/CuFCrBbI/gmc9MCd2GklIoRv71lV6qSqGVLngJFno9ZaJIATaVlEI3EXUaLvd4IuoGgwotGaQ4V8Bn8vybMN8rj0iRMmy59GZa4n9bhjTM9si2DHsaTc/OYMMPBQxuJZOGqa7cSibns0LVML5JURo+7rjjrzryQ1MyWQS0/VXHJAtIJotAN1ZLw0TbN1YrBiGTRXu27FuCaMBb9uVVX8c1aPNmkFZdm4So780g83ASaD1y0nKk1Cz2G0svLo6UShOAlS7BfZtRa9lMOFyEN+0UyM7/17mWwCO6L+IAAAAASUVORK5CYII=">
</body>
</html>

3 · base64 · filter · IMG_FILTER_EMBOSS

<?

$filename = $_SERVER['DOCUMENT_ROOT'] . '/assets/png/Happy.png';
$image = imagecreatefrompng($filename);

$filter = IMG_FILTER_EMBOSS;
imagefilter($image, $filter);

ob_start();

    imagepng($image);

$output = ob_get_clean();

echo '<!doctype html>
<html>
<body>
    <img src="data:image/png;base64,' . base64_encode($output) . '">
</body>
</html>';

?>
<!doctype html>
<html>
<body>
    <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAIAAAD/gAIDAAAACXBIWXMAAAsTAAALEwEAmpwYAAAJuklEQVR4nO2dX0wbRx7Hv7ECjhrbBDspplEJMpUDRHdNKjWnU9W3tYx4aBHVvbRNJE6q+pDLA1qp2rfOI1RyW4VUQq1EI5+EBKpcn5pUgKlI26BLqBoDlQEH7ABtgq3yp7HdE7Yj5R6WGPDfndld2xA+LzEw+9vJxzPj8fzbQ0+ePEEpEATu9dcrYzEdgI2NagDJZMXa2vG0ZCbTakVFEkB19QYAnS5WWZmw2UaLnl8AOFRMWTxvD4WOLi0du3//2MOHhg8/ZIyj10e+/vqPU6f+MJv/dDiGFc1jPoohq7PTvrBgvHu3Vo6gXOj1kZs3V156af2TT1S3pqIsQeB+/dVw82a9Go4y0esjd+8uvvhipKtLrUqqiiyet09N1Xz3naUIjjKxWIJTU2E1qqfCskqraSdqKFNMliBwPt+J69dPl1zTTqxW//T070pVTGVkvfNO+/Xr1s7OI/JDKY5Wu2m13nvrLZf8UHJl8bx9bKze660tqwKVidm8Mj+/KLNWypLV0dHmcjWWZ4HKRKvdbGqaa2tzM0dgl2WzXRgdbSjzApWJxRK4ePHfbNeyyBIEzu1u9PuP7zlTIibT6oMHcwytPrWszk774OCZ994z0N6prNDrI2fO+Fpa6JowDVXqzk57X9+5vW4KQDRq8HrPDQ3Zqa6ikCWa2ivNeUHi8SO0vqTK2memRGh9SZK1L02JUPkqLEsQuMHBM/vSlEg8fsTnOwNwBVMWluV2N+6DFj0/0aihp6exYLICsmy2C35/+lDvvmRt7bjTeSF/mnyyOjra9mIfnZlgsMHtbsuTIKcsnre7XI3PjimR2dlGIG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c88yDo83+1+c3a2aa98RBKyCczm+TZTEPnPsLD19lpCobI+IJAQACtAkKHq7USZB364XO1+v7U8ixghm8C9XKMuVCj43B1bf//xe/dOKxRNAQgB4AdWZRaoFIo/0cnmdJpL3vA/bchDSmkSUelZYSVTppImEVWfQmcD9A5HfRF6sIQAiACLQFQNTSLFeb5hC1DtcNQqbu2poxVgg7Y7zkBRHwYpljWgyuGoZhb3VNAG8EjVcpRJkWVt4/HYksnDsZgegHhcQv7HjIrbZnS6aGvr42IK2sn/AereRNMpNWMDAAAAAElFTkSuQmCC">
</body>
</html>

4 · base64 · filter · IMG_FILTER_GAUSSIAN_BLUR

<?

$filename = $_SERVER['DOCUMENT_ROOT'] . '/assets/png/Happy.png';
$image = imagecreatefrompng($filename);

$filter = IMG_FILTER_GAUSSIAN_BLUR;
imagefilter($image, $filter);

ob_start();

    imagepng($image);

$output = ob_get_clean();

echo '<!doctype html>
<html>
<body>
    <img src="data:image/png;base64,' . base64_encode($output) . '">
</body>
</html>';

?>
<!doctype html>
<html>
<body>
    <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAIAAAD/gAIDAAAACXBIWXMAAAsTAAALEwEAmpwYAAAHGklEQVR4nO2d3VPaTBTGn8V+CKgEFB2gasexF47jTQe96d/PDYmOjp8zVKfWQUdLYdGClo7mvVhePgPJ2WwwYH7TC7XJyebhbNg9e/aEmaaJ1+D6mqXTcicinX6dNr8b5cV0nUWj+PsXHz4gk5E0Eong+Jg1Gvj4EbUatrdHJxwbgWfl8ywcRiiETAaaptIy5ygW8fKCx0fs7Hh+Ix6KZRgsEoFpqteoH6EaY6jXkc16dUeeiKXrLB7HwoLnGvXDOUolVCqedE/FYr2iTJ14JJkysQyDJRJIJF5Zpk44R7mMcllZx1QjlmGw9XUfydQJ5/j+XY1ebsXSdTY3h6Ulnyol4By3t7i/d9srXYm1t8fW1nwtUyec4+ICX7/K329I+sxcbpyUAqBpWFtDLsekLch4lmGwaBSp1Dgp1YJ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9INF5IFAIwPU0+OZkcllzvZ3SdJZPks4REIQC1GjmPSdOwsEC+pB+QqGbCeXPNJQQgm5V5bDlffPYPcsvUxWJzwa05zpLIZKNmNvgBueyHljhNsR4fZTIK4/FxenKJokJUOG8PJ5ti7ezI9ERNG6cUOLnWFovtMmbt6Y5cPlsyiYODMXCugwOZL0F0y9L+UeI7EYCmYXXV7096w2CrqzJu1foeFLTFymZNUmJ2C03z+ybqWEzycVEqdSWedPU9ziUTx5NJVwVxPCWXk+yAFmr07EqQ3uhUqWB3l7D9YTTs7spvG+nf6NT7VJd2LrHBeG/PR/7lZkO8tQ79n8b5uavNLj7xLzc+ZZo4P7e4C4vxQrksv+XFfUEvJbgshCYqK/ZjXdfB5TZp27RP73CZsIrhBRUHubH05snOLrm/P9Iuub+vYBfgkM2fA2PwYvOkm9mMOLdQYJx7Xi5a15kYHrvfBThkO9UoyqtYZi6rQmGGsm15FZuaf7kc29xUM1u23C/vBoV77QFwjuNjfPs2rG32BRJPT9nGhoLWtNr06xeen/Hnj6SjGQabmcHUFJJJlTGP01NsbNi0x37dsFZDtaps9teKk3CO01P2/Iz37+1r04o6u//+YWoKXlQzqVYdbeN0VHrT6zJ2nOPHD9TrFruIGg1EIvj82durX105KsPptE7ppJb9c64UnOc6bG0pqJTgN0hKgZQYMmF6UZUCNYtG6FWtEtvlP6pVslIIClGTkK8Hr3C8OjKcjDyHEBTPJ+D2tQzuQyIjQFXIKHjhB4HgVTIEFL+kyDCYyEbyw0uKOFccFPLk9VevKJlHMgm8fbFaNIqXl9G9WC0UkhxAOSR4ZR+BUYjVQvja01PzZZDSy5/FIhoNTE9760f9jFSsTsbxNaP/Ae6TzfRc9nUSAAAAAElFTkSuQmCC">
</body>
</html>

5 · base64 · filter · IMG_FILTER_GRAYSCALE

<?

$filename = $_SERVER['DOCUMENT_ROOT'] . '/assets/png/Happy.png';
$image = imagecreatefrompng($filename);

$filter = IMG_FILTER_GRAYSCALE;
imagefilter($image, $filter);

ob_start();

    imagepng($image);

$output = ob_get_clean();

echo '<!doctype html>
<html>
<body>
    <img src="data:image/png;base64,' . base64_encode($output) . '">
</body>
</html>';

?>
<!doctype html>
<html>
<body>
    <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAIAAAD/gAIDAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC2UlEQVR4nO2dUXLrIAxFSeatw/vfVrKRvA86qes4mCvpYsD3fHZaIh2Eg6kNt9frlc7g+Xya/3ZZlsBI6rm1lOUR9I2W4lrIYjj6pIE1oqw2jj7hWaPIOkvTGoayYFk9aFoTqyxMVm+a1kQpu4e00rOpFBeet7I617TBWWKuyhrLVHIHbJc1nKmMJ2zLMBxU0wbDkIQraw5TyZQIJmsaUxk0HUDWZKYyUFK1sqY0lalPrUrWxKYylQkey5reVKYmzZjbnYtwIOsiZZU5TLYk61KmMuWUv8q6oKlMIXFdswD2ZV22rDLf0t+RdXFTmV0JGoYA2yWa8LJar4Sw/8lKDT6l9C+29cInvX8SlRK7/U/+VFbgxxwurVGfdSAlQrlmnfXgBjuAX1m80eH5tfbtb1hr0bchQLAsqD8Nnc9uv8yPLE1EC7zlaBgCSBbAPYWOQagpw+ey2y83pcoCiJdV2Z/mbme3X0CVBXB7PB6kpr9Nc9i3CsQbaZ6szNBLNBvosmZC1ywAyQKQLADJApAsAMkCkCwAyQKQLADJApAsAMkCkCwAyQKQLADJArA/n3X6ozJmzAuq93FzbsyyLBqGAHpHGkCVBXBPjkv1cMVlDjgrUmUBeGUNVFz+UH9kaQJR4C0nYBgOUVwhQWqXI4BfWRqJu1DesOi2uAID+yPLWVwd+nKGtBESPM/qyld4MFtZ/itXJ778YXyqoMzgT/dFCmB/s7HGb4gFQo18v7IY7581gN3HxNd+MzkBdom16ZXSnn/s97NDaBnkwQaJPW9K3j62490keRVus3ZiPPRrVoF12uVAT5+LZKr2Ke0kVio1ZV41KZ1+QaIywdoZ/MS+6lMDbnem9AUlhd0bTuYLTQe+kZ7GlyER++b5435FmvvbvkQzaIl5wnatZw3nyxlwzOko/Q/JkH6NWSntvMSiwtMhRQA6/gpAB6sB6Mg+AB0GCdBU1poRjxn9D1vhiPbyA6jvAAAAAElFTkSuQmCC">
</body>
</html>

6 · base64 · filter · IMG_FILTER_MEAN_REMOVAL

<?

$filename = $_SERVER['DOCUMENT_ROOT'] . '/assets/png/Happy.png';
$image = imagecreatefrompng($filename);

$filter = IMG_FILTER_MEAN_REMOVAL;
imagefilter($image, $filter);

ob_start();

    imagepng($image);

$output = ob_get_clean();

echo '<!doctype html>
<html>
<body>
    <img src="data:image/png;base64,' . base64_encode($output) . '">
</body>
</html>';

?>
<!doctype html>
<html>
<body>
    <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAIAAAD/gAIDAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC80lEQVR4nO2dwXaEIAxFtaf//8t2kSnjOIo88gIEc9ctJpegiA6u27YtfVgV/9sn5t+2h9MIumqnnbg2sliO8o2bWzOVZeooczgra0ayGms6PTpfGV1WX017+MqIssbRtIep7IfSyqimEpzw9JU1uKYEocSUleXFVEIVsEaWO1NCfdh1w9CppkTlkKyoLO+mEnAiqKxpTAlYOpCsyUwJQFLlsqY0JZSmVihrYlNCUYIlsqY3JdynybrdeQS3sh5SVsJNsnlZjzIl5FLOyHqgKeEy8ThnAVzJemxZCefpn8p6uCnhREIMQ4DvJRp6We1XQixq1q799bCMY/rc8HvBaPsPwkX7Rw7DkHiYzNLapn7ckm+B+PjrQ4jROavXyya2Aexl2Y0OzZ+1b//AW0tcDQHosqD+rOh86/ZzJFkxEc3wkhPDECBkAYgs4hiEmqo4rnX7uaaisgAsZBX2Z3W3W7d/SVQWwGr5GvxV09a3ClbTIFNZgt8lmiMNZM1DnLMAQhZAyAIIWQAhCyBkAYQsgJAFELIAQhZAyAIIWQAhCyBkAYQsgJAFoHk/y++yYeWC6o/nnBuzxTAEiN9IA0RlAYis6tOWu+KqDnhborIg9LIcFZc21CQrJhAZXnIow9BFcRGCjF2OAPayYiSe8tZCvBoOW1y0wA6ylMU1oC9lSB9C6POsoXyRg/mWpT9zDeJLH8ZRhdEMvrsvkwBOZVEui2snZazjnki4qiz+78+aYPtqb4O9la32oz07ii2ZcxY3PbtRSW/5MvH8CZ5eDtzELDogl/LtMNwMAlJur2034m7iabx5/oHyPfC7z0WWpUyWRXF9013HfZkXTkqnX5AoSrB8Bj+xr9LUoNudKX0BSaH3hpP5wtKpuJGexhecSN3UwXYzIXsq+1uzROO0xOrDVq5nufOlClg/g/cyJAn9ylopHbzEOOER7w3HLLFBP1IkjKPMweevhL7KnH1YTUhBt7Hm+5N9CVNrs30MMsHa3aPPxfcPPYtqBevzehEAAAAASUVORK5CYII=">
</body>
</html>

7 · base64 · filter · IMG_FILTER_NEGATE

<?

$filename = $_SERVER['DOCUMENT_ROOT'] . '/assets/png/Happy.png';
$image = imagecreatefrompng($filename);

$filter = IMG_FILTER_NEGATE;
imagefilter($image, $filter);

ob_start();

    imagepng($image);

$output = ob_get_clean();

echo '<!doctype html>
<html>
<body>
    <img src="data:image/png;base64,' . base64_encode($output) . '">
</body>
</html>';

?>
<!doctype html>
<html>
<body>
    <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAIAAAD/gAIDAAAACXBIWXMAAAsTAAALEwEAmpwYAAAH2ElEQVR4nO2dzU8aWxiHj6Qb7ThdNClkuA0plovdmKBLWNRI7EaNKdyNJg1s1USEyPAngMFqmnZZNbbd1MZEd9YmNu1liU1cKBalIQUCTZpQSnA5dzEWcYBhzsfMAJdf3gXROe+c85yPOXO+povjOKCGAoHQ799ULqcFACQSRgBAqdRzetovuMxsjvX0lAAARmMCAKDV5np7i8Egq3h8AQCgS0lYPt9yNqtLJg3fvt3LZPTIfhgmfe/eN4MhqdNll5d9BGMoLiVgLSysnJ3dPzwcxAFUTwyTHhw8vH//bGVlgbhzgWSEFQiEvn//6+PHh3IwqhbDpB8+/Hj3bkrGSsrJIK83PDK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J+/UheZHJh4yfhhNb9/KZNhDg6GFfuw2vDwAcNklpb8Mt1CiU/2eTyriYQxGh2S6ZN9Q0NRozEhadgAT4p+DJJlQ+m0Ppk0JBJGzI9BGo0JgyGp16dDIeVWmCsKq1J+/9LFRXc2qwN/TvMS/8wov21Gp8t2d1/IV9HE9R8AaDdg/dRDrAAAAABJRU5ErkJggg==">
</body>
</html>

8 · base64 · filter · IMG_FILTER_SELECTIVE_BLUR

<?

$filename = $_SERVER['DOCUMENT_ROOT'] . '/assets/png/Happy.png';
$image = imagecreatefrompng($filename);

$filter = IMG_FILTER_SELECTIVE_BLUR;
imagefilter($image, $filter);

ob_start();

    imagepng($image);

$output = ob_get_clean();

echo '<!doctype html>
<html>
<body>
    <img src="data:image/png;base64,' . base64_encode($output) . '">
</body>
</html>';

?>
<!doctype html>
<html>
<body>
    <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAIAAAD/gAIDAAAACXBIWXMAAAsTAAALEwEAmpwYAAAEk0lEQVR4nO2d0W7kIAxFL3T3bf//X1upeB8IGUJIAsbOQIarqh2NOiY52JBicA0R4RYREUCAAwB8A/8ajP34H8b8bb+wQjnnjD4sAkDkX3wp2HcAjDEKljcioj96xqNWNBitslg6Q52aBiwK37+w3MY9elFTQiYLa4MJt5KKZZWQScFKMeFtpFbJI7MSRvw0Z3sitcoS9QKLwtdmCO+G1CIimUm/BVbGodAfqSABF2PDyjgU+iW1qJEXA1Y+9NA9Ka+WkKyFlQ89DEIqiBmSVbDyDoXBSC1i8CqH9ShSXrW8CmE9kJRXFa8SWI8l5VXO6xLWw0l5FfIq8ayHkwq65nUOi6JlqejdB5IquqkTWAM/efJ0GYxHsD6OlNc5rxPP+jhSQYe8srAyQ9XHkDq70z2sAdantHUUjFnP+mhSQRleyRp8GoCNpOLlbw3oevaJsF+73ycsZNbRo5YoesdI3ZK2fW8ycZ04DDduJUFqP1GQMdSYbTHmwn6T9djWzlIyZgnk+6I7ObwM4JffwGLh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filter · IMG_FILTER_BRIGHTNESS · args

<?

$filename = $_SERVER['DOCUMENT_ROOT'] . '/assets/png/Happy.png';
$image = imagecreatefrompng($filename);

$filter = IMG_FILTER_BRIGHTNESS;
$args = -255;
imagefilter($image, $filter, $args);

ob_start();

    imagepng($image);

$output = ob_get_clean();

echo '<!doctype html>
<html>
<body>
    <img src="data:image/png;base64,' . base64_encode($output) . '">
</body>
</html>';

?>
<!doctype html>
<html>
<body>
    <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAIAAAD/gAIDAAAACXBIWXMAAAsTAAALEwEAmpwYAAAG5UlEQVR4nO2dv0/bTBjHv86LhKDpLR2IjCpUIDJTpcAYhiIiJkCoyQQLWWEgOCLOn0CRXrVL50ZI3RA7U7tkpEgMqFVSKtQ2IkMXGujod3AaguMkvl+2kzefqSV3z919fXe+n48V0zThB/m88vs3qlUAuLwEgLs7fPliD6ZpGB0FgMlJABgbw+PH2N/3J8+Kl2Jls8r1Na6u8O0bKhV2O6qKZ88wMYFIBP/+613+vRBrd1cpl/HpE5dA7VBVzM5iehqvX0sviESx8nnl+3d8/ChFo1ZUFS9e4OlTmY3UlICuY3FRVoa7srgIXZdSLsFG/ZWpGRmSCTNnGFhe9luhFpaXYRjCyijG0Po6CPFbmDYQgvV1McXktaLriMX81sMFsZiAVskVf3MzuBWqFUKwuclVXvbIiYTfpWcikWAvMktMw4Cm+V1oDjSNsdenjpPJQFX9Li43qopMhrrsdBEymV7qpDpDCLVeFKH7SSkLWr3cBu0/pSyo9HIVrl+VsnCvV/dAhtEPPXpnVNXV+7F7iJ4eJbhH07jF6tGRJxtdx6udft7c9Dv7ntN5PtT2N13v5069HYR0mm+3/aEn1hJkEItRirWx4XeWfWVjw1kWh78axv+xATZDiPNIYqg16MUFbm6EJdzYJXXcQw2m/ZsbXFw4/WATT9fFpEcIUil7Z6nrSKXEVFvZ9gGHnt7+fyEDq84LRvzLYbLtW7QOu+xPhh+XS2vMb9sObyvhetkqV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JOyWqVhIJkUdj8gnWZyr2Ih0HGPJZnAWqbrImWCC8c93b12z8woYv0xxOOIRmE7wu4e6zB9qQTmcbkjmobPn7vkp/vR7tVVvH8v0k15sVgv5/Gx8vw5njxBONzFB342q9Rq+PUL5+dS9kpUFaur3YO58gefySjv3ol0I+KIqjpcga5WpbuTJwTpNN68cVHNXXYQOzv96aCGEOzsCHWQ2K96USlFJ1af6UWrFLVYll594FxSVamVYhHLNM29vd4+XKlp2NvzxBF1gx51NOm1i/MG6XQvdWHWEIGnvLyTj1yuZz7L0GGG7JFYFhsbwa1ihLRdn6JF2LR2bw+c69EyWFlh7MsdEbxsksshIB1/IiGg3dmQssbkr2QyZLKQ+GG1XE6pVPDhg3cfVltYqB/+lJSEF5/sy2SUy0ucnsr6ZN/cHCYn3S0b8OHpxyANQ/n5E1dXuLzk/Rjk5CQmJjA+jlev+utjkI7kcsqfP3UvCZY3r86fGbWuzUQiGBmR2NA68x88yPXVOa8PsQAAAABJRU5ErkJggg==">
</body>
</html>

10 · base64 · filter · IMG_FILTER_CONTRAST · args

<?

$filename = $_SERVER['DOCUMENT_ROOT'] . '/assets/png/Happy.png';
$image = imagecreatefrompng($filename);

$filter = IMG_FILTER_CONTRAST;
$args = -100;
imagefilter($image, $filter, $args);

ob_start();

    imagepng($image);

$output = ob_get_clean();

echo '<!doctype html>
<html>
<body>
    <img src="data:image/png;base64,' . base64_encode($output) . '">
</body>
</html>';

?>
<!doctype html>
<html>
<body>
    <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAIAAAD/gAIDAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC80lEQVR4nO2dwXaEIAxFtaf//8t2kSnjOIo88gIEc9ctJpegiA6u27YtfVgV/9sn5t+2h9MIumqnnbg2sliO8o2bWzOVZeooczgra0ayGms6PTpfGV1WX017+MqIssbRtIep7IfSyqimEpzw9JU1uKYEocSUleXFVEIVsEaWO1NCfdh1w9CppkTlkKyoLO+mEnAiqKxpTAlYOpCsyUwJQFLlsqY0JZSmVihrYlNCUYIlsqY3JdynybrdeQS3sh5SVsJNsnlZjzIl5FLOyHqgKeEy8ThnAVzJemxZCefpn8p6uCnhREIMQ4DvJRp6We1XQixq1q799bCMY/rc8HvBaPsPwkX7Rw7DkHiYzNLapn7ckm+B+PjrQ4jROavXyya2Aexl2Y0OzZ+1b//AW0tcDQHosqD+rOh86/ZzJFkxEc3wkhPDECBkAYgs4hiEmqo4rnX7uaaisgAsZBX2Z3W3W7d/SVQWwGr5GvxV09a3ClbTIFNZgt8lmiMNZM1DnLMAQhZAyAIIWQAhCyBkAYQsgJAFELIAQhZAyAIIWQAhCyBkAYQsgJAFoHk/y++yYeWC6o/nnBuzxTAEiN9IA0RlAYis6tOWu+KqDnhborIg9LIcFZc21CQrJhAZXnIow9BFcRGCjF2OAPayYiSe8tZCvBoOW1y0wA6ylMU1oC9lSB9C6POsoXyRg/mWpT9zDeJLH8ZRhdEMvrsvkwBOZVEui2snZazjnki4qiz+78+aYPtqb4O9la32oz07ii2ZcxY3PbtRSW/5MvH8CZ5eDtzELDogl/LtMNwMAlJur2034m7iabx5/oHyPfC7z0WWpUyWRXF9013HfZkXTkqnX5AoSrB8Bj+xr9LUoNudKX0BSaH3hpP5wtKpuJGexhecSN3UwXYzIXsq+1uzROO0xOrDVq5nufOlClg/g/cyJAn9ylopHbzEOOER7w3HLLFBP1IkjKPMweevhL7KnH1YTUhBt7Hm+5N9CVNrs30MMsHa3aPPxfcPPYtqBevzehEAAAAASUVORK5CYII=">
</body>
</html>

11 · base64 · filter · IMG_FILTER_SMOOTH · args

<?

$filename = $_SERVER['DOCUMENT_ROOT'] . '/assets/png/Happy.png';
$image = imagecreatefrompng($filename);

$filter = IMG_FILTER_SMOOTH;
$args = -2048;
imagefilter($image, $filter, $args);

ob_start();

    imagepng($image);

$output = ob_get_clean();

echo '<!doctype html>
<html>
<body>
    <img src="data:image/png;base64,' . base64_encode($output) . '">
</body>
</html>';

?>
<!doctype html>
<html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MsHa3aPPxfcPPYtqBevzehEAAAAASUVORK5CYII=">
</body>
</html>

12 · base64 · filter · IMG_FILTER_PIXELATE · args arg2 · false

<?

$filename = $_SERVER['DOCUMENT_ROOT'] . '/assets/png/Happy.png';
$image = imagecreatefrompng($filename);

$filter = IMG_FILTER_PIXELATE;
$args = 10;
$arg2 = false;
imagefilter($image, $filter, $args, $arg2);

ob_start();

    imagepng($image);

$output = ob_get_clean();

echo '<!doctype html>
<html>
<body>
    <img src="data:image/png;base64,' . base64_encode($output) . '">
</body>
</html>';

?>
<!doctype html>
<html>
<body>
    <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAIAAAD/gAIDAAAACXBIWXMAAAsTAAALEwEAmpwYAAACNklEQVR4nO2cwY6EIBAFceP//7J7mI1rHEUf3Q0iVcdJFKx5tG0kTsuypDZMhmPbzHmuO5xF0Nl56omrI8vLUf7k4dZCZYU6ygwXZS1IVmVNh6P7K3OX1VbTFn9ljrKeo2mLp7Ifl7M81dSKz/TsyXq4phWHiBmT1YupFdOELcnqztSH/LRz0SuT1akmKwXLcFBTSZc1rqkkyhraVFJkjW4q3ZaFqZTuycLUH16PO0NwKYtY/ZNvSgc0lbvkTLIGNHUBNUvgTBaxOuBQFqaOYRkKfMsiVqeQLIGdLGKVg2QJbDt491hdvkopHvHmSxrnKyJZAm1lRe97cT7/KovSfg3LUABZAh9ZrdZg9LjcDdvRUFZnsUokS2JuUbDsI7YpshV2Ky9fv/RKhX3wfQvaQs0SQJYAsgSQJYAsAWQJIEsAWQLIEkCWALIEkCWALAFkCSBLAFkCyBKYU1rid7M8jcLrJVkCA8oqfycwoKxyPrKKS093b25MEyZZAnZZHYXLOtVVVqdNQFVclmEX4XKYJF85EtjudbC08uno2Lct7RHuhm6p38l6WxZ868O7kxW+Afc14WJP6V1C7s6HsrzC1aSfmOLGPUtWp75ih6u2pzS6FNb4VzI1y/fy4lZH4LrbkU+Wsaf/xvfT5BGO/L8m6cJU6qvZc2hDWUkJ2iMe1NvK2vIIHXne2pSGgCwBZAkgSwBZAsgSuGwdOmh/RMqfHEiWALIEkCWALAFkCSBLAFkCyBJAlsAvhpUlKZIgpNwAAAAASUVORK5CYII=">
</body>
</html>

13 · base64 · filter · IMG_FILTER_PIXELATE · args arg2 · true

<?

$filename = $_SERVER['DOCUMENT_ROOT'] . '/assets/png/Happy.png';
$image = imagecreatefrompng($filename);

$filter = IMG_FILTER_PIXELATE;
$args = 10;
$arg2 = true;
imagefilter($image, $filter, $args, $arg2);

ob_start();

    imagepng($image);

$output = ob_get_clean();

echo '<!doctype html>
<html>
<body>
    <img src="data:image/png;base64,' . base64_encode($output) . '">
</body>
</html>';

?>
<!doctype html>
<html>
<body>
    <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAIAAAD/gAIDAAAACXBIWXMAAAsTAAALEwEAmpwYAAAGyElEQVR4nO2du2scVxSHv9mHAtYaIwc1ttGKWMRuAoGkCBhDYhKpUJciGDXG/0D+CrduUoe4E4mKNI4NNsZJY0iRQCCFbZCCVpgUNpEjIslIuzuTYjzr1TzOzH3Njtb7oWI1d+5jf3vunTP3nrnjBUGAPrfE1G/E1D8M6v1QTP1aTL2uXWtDO6cWPvSgD75ZOXtQgzo0oGanaQUoR6w+dKEPJlY8TAB96MMheFCHJtQtFZ6JU7EC6ELXnkZZtfSgBx40oemuJkc23IFV2INDx0oNE8Ah7MEqdFxUYN2yOvAIXtouVomX8BPMwCVoWyzXoljb8ABe2CvQkFCyWfgcTlsp0ZZYd2DL+BrnghfwA8zBsnlZ5mNWB27BZiWVCvFhE26ZD2SGYt2Hu7Bv2IhS2Ie7cN+kCC/Pgxf83U34xaTuEfEpzGenSvckepbVg6ewq5V35OzCU+hp5NQQaxfWoatRWWXowrrGj60q1i5s6f0sFaMHW6p6KYm1W1X/QA9fVa/iYo2ZUiFqehUUayyVClHQq4hYPXg2pkqF+PCsyEBcRKyNsRjRZXqwkXtSrlibx9xLKE4XNuUzvCD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T5xuWzOYhDiowfr0yU6oGS6lHk5zKDgctSA/2R+RPrMG+cbD6HJxKHs2yoOU0V0CJPtws3V+9BjeNw0pPZG09KXS3K8aTggE8hsul3D/egMvw2HjiqAZXhLQs2mlPKmpwALdh0VmvXINFuG02SA1YEDbNzd1N8jNxb6nfxLypMxmD2/VPxLwyv0YfUhsvD1gfZye14GchZ25Hm7e9D3YQ/Wk/1uEPFWKRprglJxSbxjoP6w4eSNyBWrSPeyNvHaAf7brfdfOgXgPOFzmpyDnn3Gxj5x8daFJnt01ssCA1OFdEioLXuxbMuV8x86Pn8Yf/SlBqDloFTy1IOXqVjIJSKH75MdNLTSnUv3moV8nvVHFBQ1UptMykBQtO36vhniYsqCqFbp9qwAWNyqpBCy7odY5cD15mBdazL1jyIp28y42MfB+WMmEAQA0WYFW7VsPR5wt4Hx4ehw0CT8AVw5elmF/a2nAd5it8lazBPFw3f62MrevaMuzAvSq9SiZkFpayO6YaFp2AU/BVNV5SFFLplxSFtKEdSaYXhWGOfZlCHA00bViBaZgqcVc7D6ZgGlZcKIVjX9yLdhDtRy+KcxEs6EGjwCSPBcq5cQk36nvH3ssgvTF+GeSAWt6u6AWZtlGIMv8DSs2RYpP92z4AAAAASUVORK5CYII=">
</body>
</html>

14 · base64 · filter · IMG_FILTER_SCATTER · args arg2

<?

$filename = $_SERVER['DOCUMENT_ROOT'] . '/assets/png/Happy.png';
$image = imagecreatefrompng($filename);

$filter = IMG_FILTER_SCATTER;
$args = 2;
$arg2 = 4;
imagefilter($image, $filter, $args, $arg2);

ob_start();

    imagepng($image);

$output = ob_get_clean();

echo '<!doctype html>
<html>
<body>
    <img src="data:image/png;base64,' . base64_encode($output) . '">
</body>
</html>';

?>
<!doctype html>
<html>
<body>
    <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAIAAAD/gAIDAAAACXBIWXMAAAsTAAALEwEAmpwYAAAE/0lEQVR4nO1c3ZqrIAxM+u37vzLnwh4aMgmKJlYrc7Ff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Wy5gNRBPXf+0X4dJFI0cDlgkUEqpsSLawmnZE4T08lTqs+uj21mVMYWJB7WdVgmNQhlisb/Ni8D2kvP0sZfMq/1Y1TUdTKYWZiwSmnYii7hA7/1s5/C5hToSXsuvVapQpJQKLIEr7CwsTysWlWMzEgtpwxkZSYUSGF4bh8sZ1TdHkebx0K09i4ZB36NNjR1l5yURFZ1Hzej9ZWY1t9Q0+7zaqkMQ8Cy3/i9i0Gp4m+9rdd0mRMIyyb/BnMnUpyBj8kLAlz3oIZV4S81l5NialT+CrisjdIJn/XkVBPbqSXLK3k3VCJvFFqOdwvBwIw/o7PxmPSk01E9abazsepH+ML2+DiNpI2rnr8BvB2NnClXUace0weK+be0GRotJv3Ep86GpoPsPjIog1A47v72JhmD2x4MLcRFOFh/az7kITdXfE1KpnSoz7+1k/BikTPBNhiyn5uwti3vwrl0zBcDz9E6Ai5kItjwvY24PfgesvjirEcMCKIB2PUWF4NX31Dzg6W/7mlvf724yX2eSlVPUJPCpLJviJ43T3GEQF3vFsuBFyZHLzMzBOvclzy5cqNweDxm/uaxMR/QNYkNnbBjKUrQAAAABJRU5ErkJggg==">
</body>
</html>

15 · base64 · filter · IMG_FILTER_SCATTER · args arg2 arg3

<?

$filename = $_SERVER['DOCUMENT_ROOT'] . '/assets/png/Happy.png';
$image = imagecreatefrompng($filename);

$red = 255;
$green = 255;
$blue = 0;
$color = imagecolorallocate($image, $red, $green, $blue);

$filter = IMG_FILTER_SCATTER;
$args = 2;
$arg2 = 4;
$arg3 = array(
    $color
);
imagefilter($image, $filter, $args, $arg2, $arg3);

ob_start();

    imagepng($image);

$output = ob_get_clean();

echo '<!doctype html>
<html>
<body>
    <img src="data:image/png;base64,' . base64_encode($output) . '">
</body>
</html>';

?>
<!doctype html>
<html>
<body>
    <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAIAAAD/gAIDAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFlUlEQVR4nO1c27brIAiErvP/v+x5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7Xp5dcA58r4lyNJULGSSd3FXo/aapNVc5PoTk8yiWeOkqyQSGS//lKAcSzODuMeNWSlV9chUrWb4vavNyetm36Ej3A4hj0XtYSaPaD5lmlnBnvTMvxPaZQcItQgiA7X06OSnNEZtUTPoOl8M5ZoUE1NfZX1YeCFxFf1Vn1kMiVJDAnDXVWQrBBRxGhSI0b1lHx38+jz5jFRoq4sF0pb/JO9XoGb8r4XmOgXkjVuX8eJQZS0NxUxyQppHCxurZ43YlIdQqcYyvXih1RtRs8Ce54VOEJRF8q+GlihG6pkGMVspZ+EqQyJP86sYKikWTEziAq4mzk3QAuTwKbteRZFK6V0ARU1BLFJFrleqWLjjlr2mzL3PSupZ/G+4miTHPGqih5LkyyJ/Hz2Qi/DMJwvEgOrlyremcRk0CS7CIxuvvjP8xXQs6RzYYmT/MgsjyzGs3hHyCr5pdyAZb0m3wqzhfYLnBt6uLjcF8OUS1J3jg8dMsTrAyEnGLqfGdKsy+LxSiif8jDmWdX0l0GJozmB3VCOaxZm8AUwFUpO5huxPzfd6Y+PbgFzRUhNLVSaqd2dW0tYZ+5FMHo4OoLv46b+Jecx1HKEi5R7YIZs39OtXKy0om46UU3Z+F3UEs1dXKyz5lPA4zbs0/VfOFNqrnmptVb51FynpnnNMsv0IV6G8YWdOENUkpXs9eLf6SLi4u/FUH2/VFVz7Z9a/VLz+T1Z6u7O9cMxNZvDaFIh2W9a1V3yuRH8QeB2Qx5wJEntHdOVyPEvhk+iq/6LhqF5Q8yqC1yzZieyCDhSq6MovkxE/wHVPzbUaZ64+QAAAABJRU5ErkJggg==">
</body>
</html>

16 · base64 · filter · IMG_FILTER_COLORIZE · args arg2 arg3 arg4

<?

$filename = $_SERVER['DOCUMENT_ROOT'] . '/assets/png/Happy.png';
$image = imagecreatefrompng($filename);

$filter = IMG_FILTER_COLORIZE;
$args = 255;
$arg2 = 255;
$arg3 = 255;
$arg4 = 32;
imagefilter($image, $filter, $args, $arg2, $arg3, $arg4);

ob_start();

    imagepng($image);

$output = ob_get_clean();

echo '<!doctype html>
<html>
<body>
    <img src="data:image/png;base64,' . base64_encode($output) . '">
</body>
</html>';

?>
<!doctype html>
<html>
<body>
    <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAIAAAD/gAIDAAAACXBIWXMAAAsTAAALEwEAmpwYAAAGSElEQVR4nO2dPUwcRxTHf3NKY0QbU0bQYiQaU6TCSJGvMI7cgIncRBhhKQoSaZzCJMpHQZpEAlNYhg4Fh8aKwVKsSBeqFLhBAreHUl7SnnC5KZZdjr293X3zsbd73K+823kz9783s7Ozb94oz/PoDgqARQBuAHANRtouq8N7AE4AeAZAd9qs8hVLwX0Yh49gyMBOA/6BI3iRp3D5iKXgK7hpJlAnGvAWfs5BNadi+X70qRuN2mnA7059zZFYCr6BSQeWs3AA37uQzLpY3ZWplQPrklkUyx+Y7liyZot9i8OZLbHm4DMYtGHKOk34FXbMDZmLpWAtmCgVmRNYMnQxQ7Gq8EVRHaqdJmzAH9rlTcRagSntirtHDX7QK6knloLNuEeTslCHhxpdUkMsBTt5zTPd0YA5qV5SsRS8Ks8glUwT7or0qkis95JSwCC8ChY/MpFdrB5TykemV0axelIpH4FeWcTyR/SeVMpnEHay6JVFrM3y3/tSGYLN1ItSxVop83xKxAisJF+RLFa1nHN0baagmvB1wjyrhwf1BJImXwmetXb1lAIGYa3Td53Emi3DqosjbsBs7BcfxH3od8CrzANQ7Z0xVqxlqx2wDmcADLi5sbqwPwjL7Z+2D/AKajbqa8IePL/8/yhYgGkbf4Zr+8BUxLnaxbKypJe8YGS+HObavk90mTAywCv3SgEezAexCxqcwHya/YdQ17UfMhV5BoqI9cS4gmbmRcglaGrZX8pwma+Xhv0IlwRpFcuKW73OvJzmwYbc/obE/mu5/QiXnKtVrBlj0wQhQRl5I7cvKiJqTCcuZGkV656x3bpwVduDd5Lr38ntm49cF7KEYikb6zDvjS1Yx7xJQ2FPDMWKmYP1CTgXJxRrwobRazaM2MVKk87F8cWy0geBEdHL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