Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Page: previous  1  2 
Avatar
pisey #16
Member since Sep 2012 · 13 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 7295
But I can't declare :   byte[] pic = Convert.FromBase64String(vcard.Photo.SetTag("BINVAL"));
Avatar
Alex #17
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
sorry, but I don't understand where your problem is. I gave all hints and there is lots of example code in this thread.

Alex
Avatar
pisey #18
Member since Sep 2012 · 13 posts
Group memberships: Members
Show profile · Link to this post
Subject: add Avatar Image to Vcard with WPF
thanks, Now I see the solution for add Avatar Image to Vcard with WPF Like this:


 //Insert Avatar Image
                objPhoto = vcard.Photo;
                if (vcard.Photo == null)
                {
                    objPhoto = new Photo();
                }
                else if (ChangeAvatar_vcard.Source != null)
                {

                    bitmap = new BitmapImage();
                    bitmap.BeginInit();
                    bitmap.EndInit();
                    ChangeAvatar_vcard.Source = bitmap;

                }
                if (txtPath.Text != "")
                {
                    try
                    {
                      
                        System.Drawing.Image img = System.Drawing.Image.FromFile(txtPath.Text);
                 
                        vcard.Photo = new Photo(img, System.Drawing.Imaging.ImageFormat.Jpeg);

                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.Message);
                    }
                }
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Page: previous  1  2 
Forum: agsXMPP RSS