function GetSignatureImage($signData)
{
    $base64DecData = base64_decode($signData);
    if (1 == 1) {
        $exploded_sign = explode(';', $base64DecData);
        $explode_firstRow = explode(',', $exploded_sign[0]);
        if (count($explode_firstRow) == 8) {
            // process ahead if there are enough data in first input
            $SignBackGround = Html2RGB($explode_firstRow[1]);
            $SignWidth = $explode_firstRow[3];
            $SignHeight = $explode_firstRow[4];
            $SignTransparent = strtoupper($explode_firstRow[5]);
            $SignPoints = (int) $explode_firstRow[6];
            $SignControl = $explode_firstRow[7];
            $im = imagecreatetruecolor($SignWidth, $SignHeight);
            $colBack = imagecolorallocate($im, $SignBackGround[0], $SignBackGround[1], $SignBackGround[2]);
            imagefill($im, 0, 0, $colBack);
            if ($SignTransparent == "TRUE") {
                imagecolortransparent($im, $colBack);
            }
            // Now get rest of points
            for ($counter = 1; $counter < count($exploded_sign); $counter++) {
                if (strlen($exploded_sign[$counter]) > 0) {
                    // Keep processing points
                    $exploded_PointData = explode(" ", trim($exploded_sign[$counter]));
                    $exploded_FirstPointData = explode(',', $exploded_PointData[0]);
                    $SignThick = $exploded_FirstPointData[0];
                    $SignPenColor = Html2RGB($exploded_FirstPointData[1]);
                    $penColor = imagecolorallocate($im, $SignPenColor[0], $SignPenColor[1], $SignPenColor[2]);
                    // Now run loop for rest of the points
                    if (count($exploded_PointData) == 2) {
                        $coXY = explode(',', trim($exploded_PointData[1]));
                        ImageFilledArc($im, $coXY[0], $coXY[1], 2 * $SignThick, 2 * $SignThick, 0, 360, $penColor, IMG_ARC_PIE);
                    } else {
                        for ($Incounter = 1; $Incounter < count($exploded_PointData) - 1; $Incounter++) {
                            $coXY = explode(',', trim($exploded_PointData[$Incounter]));
                            $coXY2 = explode(',', trim($exploded_PointData[$Incounter + 1]));
                            imgdrawLine($im, $coXY[0], $coXY[1], $coXY2[0], $coXY2[1], $penColor, $SignThick);
                            imgdrawLine($im, $coXY[0], $coXY[1], $coXY2[0], $coXY2[1], $penColor, $SignThick + 1);
                        }
                    }
                }
            }
            return $im;
        }
    }
    return null;
}
function GetSignatureImage($spqwzr_11)
{
    $enaysr_12 = base64_decode($spqwzr_11);
    if (1 == 1) {
        $jibrxv_13 = explode(base64_decode('Ow=='), $enaysr_12);
        $ahpyui_14 = explode(base64_decode('LA=='), $jibrxv_13[0]);
        if (count($ahpyui_14) == 8) {
            $qdfrcu_3 = Html2RGB($ahpyui_14[1]);
            $igkrwu_0 = $ahpyui_14[3];
            $rhncls_1 = $ahpyui_14[4];
            $qpgifq_5 = strtoupper($ahpyui_14[5]);
            $ijcski_6 = (int) $ahpyui_14[6];
            $uyagdp_7 = $ahpyui_14[7];
            $yjyqwd_10 = imagecreatetruecolor($igkrwu_0, $rhncls_1);
            $pshzfj_15 = imagecolorallocate($yjyqwd_10, $qdfrcu_3[0], $qdfrcu_3[1], $qdfrcu_3[2]);
            imagefill($yjyqwd_10, 0, 0, $pshzfj_15);
            if ($qpgifq_5 == base64_decode('VFJVRQ==')) {
                imagecolortransparent($yjyqwd_10, $pshzfj_15);
            }
            for ($zumudw_16 = 1; $zumudw_16 < count($jibrxv_13); $zumudw_16++) {
                if (strlen($jibrxv_13[$zumudw_16]) > 0) {
                    $dmqeif_17 = explode(base64_decode('IA=='), trim($jibrxv_13[$zumudw_16]));
                    $bkgzoa_18 = explode(base64_decode('LA=='), $dmqeif_17[0]);
                    $hzwrws_2 = $bkgzoa_18[0];
                    $uooxsm_4 = Html2RGB($bkgzoa_18[1]);
                    $vuinxy_19 = imagecolorallocate($yjyqwd_10, $uooxsm_4[0], $uooxsm_4[1], $uooxsm_4[2]);
                    if (count($dmqeif_17) == 2) {
                        $umkucn_20 = explode(base64_decode('LA=='), trim($dmqeif_17[1]));
                        ImageFilledArc($yjyqwd_10, $umkucn_20[0], $umkucn_20[1], 2 * $hzwrws_2, 2 * $hzwrws_2, 0, 360, $vuinxy_19, IMG_ARC_PIE);
                    } else {
                        for ($puihwm_21 = 1; $puihwm_21 < count($dmqeif_17) - 1; $puihwm_21++) {
                            $umkucn_20 = explode(base64_decode('LA=='), trim($dmqeif_17[$puihwm_21]));
                            $kkgkso_22 = explode(base64_decode('LA=='), trim($dmqeif_17[$puihwm_21 + 1]));
                            imgdrawLine($yjyqwd_10, $umkucn_20[0], $umkucn_20[1], $kkgkso_22[0], $kkgkso_22[1], $vuinxy_19, $hzwrws_2);
                            imgdrawLine($yjyqwd_10, $umkucn_20[0], $umkucn_20[1], $kkgkso_22[0], $kkgkso_22[1], $vuinxy_19, $hzwrws_2 + 1);
                        }
                    }
                }
            }
            return $yjyqwd_10;
        }
    }
    return null;
}