¡@

Home 

php Programming Glossary: imagecolorat

PHP - Replace colour within image

http://stackoverflow.com/questions/1548534/php-replace-colour-within-image

for x 0 x imagesx src x for y 0 y imagesy src y src_pix imagecolorat src x y src_pix_array rgb_to_array src_pix check for chromakey..

Crop whitespace from image in PHP

http://stackoverflow.com/questions/1669683/crop-whitespace-from-image-in-php

top for b_top imagesy img b_top for x 0 x imagesx img x if imagecolorat img x b_top 0xFFFFFF break 2 out of the 'top' loop bottom for.. for b_btm imagesy img b_btm for x 0 x imagesx img x if imagecolorat img x imagesy img b_btm 1 0xFFFFFF break 2 out of the 'bottom'.. for b_lft imagesx img b_lft for y 0 y imagesy img y if imagecolorat img b_lft y 0xFFFFFF break 2 out of the 'left' loop right for..

Get image color

http://stackoverflow.com/questions/1746530/get-image-color

pixel image 0 0 0 0 1 1 width height rgb imagecolorat pixel 0 0 color imagecolorsforindex pixel rgb html head title.. imagesx image height imagesy image for y 0 y height y rgb imagecolorat image 0 y color imagecolorsforindex image rgb red color 'red'.. red color 'red' green color 'green' blue color 'blue' rgb imagecolorat image width 1 y color imagecolorsforindex image rgb red color..

Change “HUE” of an image with PHP GD Library?

http://stackoverflow.com/questions/1890409/change-hue-of-an-image-with-php-gd-library

the image pixel by pixel Get the RGB color at pixel using imagecolorat Transform the RGB value into a HSL value Change the hue value.. imagesy image for x 0 x width x for y 0 y height y rgb imagecolorat image x y r rgb 16 0xFF g rgb 8 0xFF b rgb 0xFF alpha rgb..

Detect “overall average” color of the picture

http://stackoverflow.com/questions/3468500/detect-overall-average-color-of-the-picture

0 x granularity for y 0 y size 1 y granularity thisColor imagecolorat img x y rgb imagecolorsforindex img thisColor red round round..

How to check if an image has transparency using GD?

http://stackoverflow.com/questions/5495275/how-to-check-if-an-image-has-transparency-using-gd

can detect transparency at a glance. The comments on the imagecolorat manual page suggest that the resulting integer when working.. pixel location at x and y you can detect alpha using rgba imagecolorat im x y alpha rgba 0x7F000000 24 red rgba 0xFF0000 16 green rgba.. and then this only works with true color images. Otherwise imagecolorat returns a color index which you must then look up using imagecolorsforindex..

PHP GD Use one image to mask another image, including transparency

http://stackoverflow.com/questions/7203160/php-gd-use-one-image-to-mask-another-image-including-transparency

xSize x for y 0 y ySize y alpha imagecolorsforindex mask imagecolorat mask x y alpha 127 floor alpha 'red' 2 color imagecolorsforindex.. 127 floor alpha 'red' 2 color imagecolorsforindex picture imagecolorat picture x y imagesetpixel newPicture x y imagecolorallocatealpha..

Detecting colors for an Image using PHP

http://stackoverflow.com/questions/7727843/detecting-colors-for-an-image-using-php

i 0 i size 0 i level for j 0 j size 1 j level thisColor imagecolorat img i j rgb imagecolorsforindex img thisColor color sprintf..