void loadProfile() { User user = app.getSession(); if (user.name != null) { User profileData = getService.getUserById(user.id); if (profileData.picture != null) { nameView.Text = profileData.name; usernameView.Text = profileData.username; mobileView.Text = profileData.mobile_number; addressView.Text = profileData.address; userPictureBox.Image = app.byteArrayToImage(profileData.picture); System.Drawing.Drawing2D.GraphicsPath gp2 = new System.Drawing.Drawing2D.GraphicsPath(); gp2.AddEllipse(0, 0, userPictureBox.Width, userPictureBox.Height); Region rg2 = new Region(gp2); userPictureBox.Region = rg2; } } }