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
Mega Anaska
NA
144
36.2k
Decode base 64 to Image url
Sep 7 2019 12:48 AM
Hi guys I have script to encrypt url image to base64 like :
public
String ConvertImageURLToBase64(String url)
{
StringBuilder _sb =
new
StringBuilder();
Byte[] _byte =
this
.GetImage(url);
_sb.Append(Convert.ToBase64String(_byte, 0, _byte.Length));
return
_sb.ToString();
}
private
byte
[] GetImage(
string
url)
{
Stream stream =
null
;
byte
[] buf;
try
{
WebProxy myProxy =
new
WebProxy();
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
HttpWebResponse response = (HttpWebResponse)req.GetResponse();
stream = response.GetResponseStream();
using
(BinaryReader br =
new
BinaryReader(stream))
{
int
len = (
int
)(response.ContentLength);
buf = br.ReadBytes(len);
br.Close();
}
stream.Close();
response.Close();
}
catch
(Exception exp)
{
buf =
null
;
}
return
(buf);
}
Now I want to decode base64 to url image . is it possible? if possible can you give me reference, please? thanks. I am Mega
Reply
Answers (
1
)
How to add userid to payload when generate access token usin
convert gridview data into pdf according to selected date