TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Shahbaz Kaware
NA
535
31.7k
How to convert base64 string into image in wcf service
Nov 13 2019 12:55 AM
string _base64ImgString = objGenRequest.searchVal6.Replace("data: image", "").Replace("\"", "").Split(' ')[0].Replace("data:image/png;base64,", "");
Bitmap UploadImage = new Bitmap();
string path = HostingEnvironment.MapPath("~/Upload Images/Hello.jpg");
using (MemoryStream memory = new MemoryStream())
{
using (FileStream fs = new FileStream(path, FileMode.Create, FileAccess.ReadWrite))
{
UploadImage.Save(memory, ImageFormat.Png);
byte[] bytes = memory.ToArray();
_base64ImgString = Convert.ToBase64String(bytes);
fs.Write(bytes, 0, bytes.Length);
}
}
Please help me im new to wcf
Reply
Answers (
5
)
Publish has encountered an error.
C++ dll into WCF service