Ok, so if i go here "https://hackforums.net/uploads/avatars/avatar_806990.png" i see my profile image right
Now then when i add that url to anything on my form that accepts the url as a string it does not show.
It also does not show in a picture box unless i download it by bytes but i need it as a url string like above.
Any ideas ?
Thanks
Be Nice For Once 15hVUVz7xA4kazHdk2BuErENGCskVwjYXP
(May 1, 2019 01:25 PM)System[X] Wrote: Ok, so if i go here "https://hackforums.net/uploads/avatars/avatar_806990.png" i see my profile image right
Now then when i add that url to anything on my form that accepts the url as a string it does not show.
It also does not show in a picture box unless i download it by bytes but i need it as a url string like above.
Any ideas ?
Thanks
works for me
maybe it's your connection.
(May 1, 2019 01:35 PM)realsunjester Wrote: works for me
![[Image: ekk48yq.png]](https://i.imgur.com/ekk48yq.png)
maybe it's your connection.
Read my post again, it works fine in my browser, just not in vb.net, does not show
Thanks
(May 1, 2019 01:36 PM)System[X] Wrote: Read my post again, it works fine in my browser, just not in vb.net, does not show
Thanks
there isn't much difference in loading it, so it must be your code, show us the code.
(May 1, 2019 01:48 PM)realsunjester Wrote: there isn't much difference in loading it, so it must be your code, show us the code.
Nothing todo with the code, just go try it, try and load the url in a picturebox as the url string.
Thanks
DO NOT DEAL WITH THIS MEMBER
(May 1, 2019 02:35 PM)System[X] Wrote: Nothing todo with the code, just go try it, try and load the url in a picturebox as the url string.
Thanks
dont waste his time retard. he is trying to help you and yet you dont do what he asks..
stupid fuck
May 1, 2019 02:43 PM
(This post was last modified: May 1, 2019 02:45 PM by realsunjester.)
(May 1, 2019 02:35 PM)System[X] Wrote: Nothing todo with the code, just go try it, try and load the url in a picturebox as the url string.
Thanks
yes. it has everything to do with the code. are you using the load method? imagelocation? are you reading it with webrequest into a bitmap object?
May 1, 2019 02:47 PM
(This post was last modified: May 1, 2019 02:52 PM by System[X].)
(May 1, 2019 02:37 PM)TigerBark Wrote: dont waste his time retard. he is trying to help you and yet you dont do what he asks..
stupid fuck
Your the retard kid. I've been coding for many years and know around 13 different coding languages.
If i say there is nothing wrong with 1 small line of code to simply load an image from a url then that's true.
The issue lies with the url, it must be as other images load just fine.
Thanks for your useless comment. Have a good day.
(May 1, 2019 02:43 PM)realsunjester Wrote: yes. it has everything to do with the code. are you using the load method? imagelocation? are you reading it with webrequest into a bitmap object?
webrequest into a bitmap object, i can get it to load converting it to bytes as i mentioned in the first post but only by using the credts for HF api and header, works fine.
but as you know you can not convert an object like that to a string.
Code Dim MyWebClient As New System.Net.WebClient
MyWebClient.Credentials = New NetworkCredential("My HF API Key, "")
MyWebClient.Headers.Add("user-agent", "Mozilla/5.0 (Windows; U; Windows NT 6.1; rv:2.2) Gecko/20110201")
Dim Avatar_ImageInBytes() As Byte = MyWebClient.DownloadData("https://hackforums.net/uploads/avatars/avatar_806990.png")
Dim Avatar_ImageStream As New IO.MemoryStream(Avatar_ImageInBytes)
Form1.PictureBox1.Image = New System.Drawing.Bitmap(Avatar_ImageStream)
Thanks
im going to assume it has something to do with cloudflare, but if you cant get it to work, why load the image from hf?
(May 1, 2019 02:53 PM)realsunjester Wrote: im going to assume it has something to do with cloudflare, but if you cant get it to work, why load the image from hf?
Maybe cloudflare yeah.
So you suggest to download the image and use it that way ? You see i have a discord bot and going to add HF api features to it. it will return uerinfo from the UID and this includes the avatar.
A picture box was me trying to figure out a way.
This is why I need it as a string not an object or bytes.
I suppose i could download use then delete but that takes a second longer and with it being a discord bot i can not have anything that would slow it down. 1 second is not much, x by 10 users thats 10 seconds.
Thanks
(May 1, 2019 03:14 PM)System[X] Wrote: Maybe cloudflare yeah.
So you suggest to download the image and use it that way ? You see i have a discord bot and going to add HF api features to it. it will return uerinfo from the UID and this includes the avatar.
A picture box was me trying to figure out a way.
This is why I need it as a string not an object or bytes.
I suppose i could download use then delete but that takes a second longer and with it being a discord bot i can not have anything that would slow it down. 1 second is not much, x by 10 users thats 10 seconds.
Thanks
what if you stored the obj as a tmp file or a base64 obj, but ive been drinking so maybe not
May 1, 2019 11:52 PM
(This post was last modified: May 2, 2019 12:02 AM by 0xDEAD10CC.)
(May 1, 2019 02:47 PM)System[X] Wrote: Your the retard kid. I've been coding for many years and know around 13 different coding languages.
If i say there is nothing wrong with 1 small line of code to simply load an image from a url then that's true.
The issue lies with the url, it must be as other images load just fine.
Thanks for your useless comment. Have a good day.
webrequest into a bitmap object, i can get it to load converting it to bytes as i mentioned in the first post but only by using the credts for HF api and header, works fine.
but as you know you can not convert an object like that to a string.
Code Dim MyWebClient As New System.Net.WebClient
MyWebClient.Credentials = New NetworkCredential("My HF API Key, "")
MyWebClient.Headers.Add("user-agent", "Mozilla/5.0 (Windows; U; Windows NT 6.1; rv:2.2) Gecko/20110201")
Dim Avatar_ImageInBytes() As Byte = MyWebClient.DownloadData("https://hackforums.net/uploads/avatars/avatar_806990.png")
Dim Avatar_ImageStream As New IO.MemoryStream(Avatar_ImageInBytes)
Form1.PictureBox1.Image = New System.Drawing.Bitmap(Avatar_ImageStream)
Thanks
Coding for many years but you still don't know about Dispose() or HttpClient? 13 languages is nothing to boast about if you don't know at least a few of them very well.. ❓
Not sure what you would need an API key for here... You're just cluelessly grasping at straws there -- And if you knew how to use the debugger you could also verify a cloudflare issue.
This is working entirely fine for me:
Code using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Add("User-Agent", @"Dummy");
var stream = await client.GetStreamAsync("https://hackforums.net/uploads/avatars/avatar_806990.png").ConfigureAwait(false);
using (var image = Image.FromStream(stream))
image.Save("out.png", ImageFormat.Png);
}
This is about as basic as it gets before further error handling is added.
(May 1, 2019 11:52 PM)0xDEAD10CC Wrote: Coding for many years but you still don't know about Dispose() or HttpClient? 13 languages is nothing to boast about if you don't know at least a few of them very well.. ❓
Not sure what you would need an API key for here... You're just cluelessly grasping at straws there -- And if you knew how to use the debugger you could also verify a cloudflare issue.
This is working entirely fine for me:
Code using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Add("User-Agent", @"Dummy");
var stream = await client.GetStreamAsync("https://hackforums.net/uploads/avatars/avatar_806990.png").ConfigureAwait(false);
using (var image = Image.FromStream(stream))
image.Save("out.png", ImageFormat.Png);
}
This is about as basic as it gets before further error handling is added.
Yes many years and many old coders here know me. Yes i did not dispose but the code i posted was to test with, not actual code i'm using.
Also did i say i had an issue with downloading/saving the image. The issue is displaying it from the url.
Thanks
May 2, 2019 02:46 AM
(This post was last modified: May 2, 2019 02:46 AM by HFDone.)
i gave you the answer with link in the first reply why you didnt check it
Be Nice For Once 15hVUVz7xA4kazHdk2BuErENGCskVwjYXP
|