asTrueColor(); if (in_array($filter, self::$one_arg_filters)) { $res = imagefilter($new->getHandle(), $filter, $arg1); } elseif (defined('IMG_FILTER_PIXELATE') && $filter == IMG_FILTER_PIXELATE) { $res = imagefilter($new->getHandle(), $filter, $arg1, $arg2); } elseif ($filter == IMG_FILTER_COLORIZE) { $res = imagefilter($new->getHandle(), $filter, $arg1, $arg2, $arg3, $arg4); } else { $res = imagefilter($new->getHandle(), $filter); } if (!$res) { throw new WideImage_GDFunctionResultException("imagefilter() returned false"); } return $new; } }