Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Image not showing

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
[Image: 8Wj7xYL.gif]
Signature Created by Gσđfαtђα
https://docs.microsoft.com/en-us/dotnet/...mework-4.8
[Image: bitcoin.png] 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

[Image: ekk48yq.png]

maybe it's your connection.
http://sunjester.rf.gd - proxies, logins, scanner results
(May 1, 2019 01:35 PM)realsunjester Wrote:  works for me

[Image: 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
[Image: 8Wj7xYL.gif]
Signature Created by Gσđfαtђα
(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.
http://sunjester.rf.gd - proxies, logins, scanner results
(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
[Image: 8Wj7xYL.gif]
Signature Created by Gσđfαtђα
(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: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?
http://sunjester.rf.gd - proxies, logins, scanner results
(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
[Image: 8Wj7xYL.gif]
Signature Created by Gσđfαtђα
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?
http://sunjester.rf.gd - proxies, logins, scanner results
(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
[Image: 8Wj7xYL.gif]
Signature Created by Gσđfαtђα
(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
http://sunjester.rf.gd - proxies, logins, scanner results
(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.
Getting Started: C/C++
[C/C++/.NET/x86 ASM - Automation Programmer]
(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
[Image: 8Wj7xYL.gif]
Signature Created by Gσđfαtђα
i gave you the answer with link in the first reply why you didnt check it
[Image: bitcoin.png] Be Nice For Once 15hVUVz7xA4kazHdk2BuErENGCskVwjYXP


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by darkdev315Jan 30, 2020 07:48 AM 2 151 Jan 30, 2020 07:48 AM
Last Post: darkdev315
[C#] by C++Dec 29, 2019 06:16 PM 16 827 Dec 29, 2019 06:16 PM
Last Post: DNA
[Python] by DistrictApr 7, 2019 03:14 AM 4 226 Apr 7, 2019 03:14 AM
Last Post: lockhead