Lines Matching +full:red +full:- +full:x
6 * @author i-net software <tools@inetsoftware.de>
23 $controller->register_hook('MEDIA_SENDFILE', 'BEFORE', $this, 'reflect__reflect');
31 $data = $event->data;
32 …] ) ? $this->getConf('return_type') : (in_array( hsc($_REQUEST['return_type']), array('png', 'jpg'…
34 $data['height'] = $this->getConf('reflect_height');
35 if ( empty($_REQUEST['bgc']) ) $_REQUEST['bgc'] = $this->getConf('bgc');
43 ($mtime < time()-$cache) // 'recache' and cache has expired
45 if ( $this->create_reflect_image( $data, $cacheFile, $_REQUEST['bgc'] ) ) {
49 $event->data = $data;
58 $imagebgcolor = $this->calc_bgcolor($imagebgcolor);
71 if ( $output_height == 0 ) $output_height = $this->getConf('reflect_height');
74 $output_height = $this->getConf('reflect_height');
95 $alpha_start = $this->getConf('fade_start');
99 $alpha_start = $this->getConf('fade_start');
111 $alpha_end = $this->getConf('fade_end');
115 $alpha_end = $this->getConf('fade_end');
118 $alpha_start = 127 - $alpha_start;
119 $alpha_end = 127 - $alpha_end;
121 …// Detect the source image format - only GIF, JPEG and PNG are supported. If you need more, ext…
133 /* ----------------------------------------------------------------
135 ---------------------------------------------------------------- */
136 … $output = $this->imagereflection($source, $width, $height, $new_height, $alpha_start, $alpha_end);
138 /* ----------------------------------------------------------------
140 ---------------------------------------------------------------- */
144 if ( substr($cache_path, -3) == 'png' ) {
146 } else if ( substr($cache_path, -3) == 'jpg' ) {
147 /* -----------------------------------------------------------------------
148 HACK - Build the reflection image by combining the png output
150 ------------------------------------------------------------------------ */
154 …$white = imagecolorallocatealpha($finaloutput, $imagebgcolor['red'], $imagebgcolor['green'], $imag…
168 if ( empty($bgcolor) ) { $bgcolor = $this->getConf('bgc'); }
176 $red = hexdec(substr($bgcolor, 0, 2));
183 $red = hexdec(substr($bgcolor, 0, 2));
190 $red = substr($bgcolor, 0, 1);
194 $red = hexdec($red . $red);
201 $red = substr($bgcolor, 0, 1);
204 $red = hexdec($red . $red);
212 $red = 0;
219 return array('red' => $red, 'green' => $green, 'blue' => $blue, 'alpha' => $alpha );
236 $alpha_length = abs($alpha_start - $alpha_end);
242 for ($x = 0; $x < $dest_width; $x++) {
243 // copy pixel from x / $src_height - y to x / $src_height + y
244 $rgba = imagecolorat($src_img, $x, $src_height - $y);
248 … if ($alpha_start > $alpha_end) { $alpha_calc = (int) ($alpha_start - ($pct * $alpha_length)); }
253 … $rgba = imagecolorallocatealpha($reflected, $rgba['red'], $rgba['green'], $rgba['blue'], $alpha);
254 imagesetpixel($reflected, $x, $src_height + $y - 1, $rgba);