public function allocateColor($Picture, $R, $G, $B, $Alpha = 100)
    {
        if ($R < 0) {
            $R = 0;
        } if ($R > 255) {
            $R = 255;
        }
        if ($G < 0) {
            $G = 0;
        } if ($G > 255) {
            $G = 255;
        }
        if ($B < 0) {
            $B = 0;
        } if ($B > 255) {
            $B = 255;
        }
        if ($Alpha < 0) {
            $Alpha = 0;
        }
        if ($Alpha > 100) {
            $Alpha = 100;
        }

        $Alpha = $this->convertAlpha($Alpha);
        return imagecolorallocatealpha($Picture, $R, $G, $B, $Alpha);
    }