예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            verifierString = imageVerifier.GetVerifierString("4");
            Stream uri = imageVerifier.GetImage(verifierString);

            System.Drawing.Image img = System.Drawing.Image.FromStream(uri);

            img.Save(Path.Combine(Request.PhysicalApplicationPath, @"Member\img.jpeg"), ImageFormat.Jpeg);
        }
예제 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Response.Clear();
            ImageVerifier.ServiceClient client = new ImageVerifier.ServiceClient();
            Session["text"] = client.GetVerifierString("6");
            Stream myStream = client.GetImage(Session["text"].ToString());

            System.Drawing.Image myImage = System.Drawing.Image.FromStream(myStream);
            Response.ContentType = "image/jpeg";
            myImage.Save(Response.OutputStream, ImageFormat.Jpeg);
        }
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Clear();
        ImageVerifier.ServiceClient imgPxy = new ImageVerifier.ServiceClient();
        string myStr, userLen;

        if (Session["userLength"] == null)
        {
            userLen = "4";
        }
        else
        {
            userLen = Session["userLength"].ToString();
        }
        myStr = imgPxy.GetVerifierString(userLen);
        Session["generatedString"] = myStr;


        Stream myStream = imgPxy.GetImage(myStr);

        System.Drawing.Image myImage = System.Drawing.Image.FromStream(myStream);
        Response.ContentType = "image/jpeg";
        myImage.Save(Response.OutputStream, ImageFormat.Jpeg);
    }