Lines Matching refs:image

8  * Generates a identicon/visiglyph like image based on concentric rings
28 * @param int $size width and height of the resulting image
43 * Generates an ring image
45 * If a seed is given, the image will be based on that seed
48 * @param string $file if given, the image is saved at that path, otherwise is printed to browser
65 $image = $this->createTransparentImage($this->fullsize, $this->fullsize);
68 $this->drawRing($image, $arcwidth);
74 imagecopyresampled($out, $image, 0, 0, 0, 0, $this->size, $this->size, $this->fullsize, $this->fullsize);
78 header("Content-type: image/png");
82 imagedestroy($image);
114 * @param resource $image
117 protected function drawRing($image, $arcwidth)
119 $color = $this->randomColor($image);
120 $transparency = $this->transparentColor($image);
126 imagefilledarc($image, $this->center, $this->center, $arcwidth, $arcwidth, $stop, $start, $color, IMG_ARC_PIE);
128 $image,
136 imagecolordeallocate($image, $color);
137 imagecolordeallocate($image, $transparency);
143 * @param resource $image
146 protected function transparentColor($image)
148 return imagecolorallocatealpha($image, 0, 0, 0, 127);
154 * @param $image
157 protected function randomColor($image)
161 $image,
169 $image,
177 * Create a transparent image
186 $image = @imagecreatetruecolor($width, $height);
187 if (!$image) {
190 imagealphablending($image, false);
191 $transparency = $this->transparentColor($image);
192 imagefill($image, 0, 0, $transparency);
193 imagecolordeallocate($image, $transparency);
194 imagesavealpha($image, true);
195 return $image;