YouTip LogoYouTip

Php Imagecolorallocatealpha

# PHP imagecolorallocatealpha - Allocate Color and Transparency for an Image [![Image 4: PHP Image Processing](#)PHP Image Processing](#) imagecolorallocatealpha β€” Allocate color and transparency for an image. ### Syntax int imagecolorallocatealpha ( resource $image , int $red , int $green , int $blue , int $alpha ) imagecolorallocatealpha() behaves the same as imagecolorallocate(), but with an additional transparency parameter alpha, whose value ranges from 0 to 127. 0 indicates completely opaque, and 127 indicates completely transparent. Returns FALSE if allocation fails. **Note:** This function requires GD 2.0.1 or higher (recommended 2.0.28 and higher). ### Example The output image from the above example is as follows: !(#) ### Related Articles Allocate a color for an image. Deallocate a color for an image. [![Image 6: PHP Image Processing](#)PHP Image Processing](#)
← Php ImagecolorexactalphaPhp Imagecolordeallocate β†’