I have an unusual error and wondering if anyone can help. In the simple test code below I am downloading a specific .png file from my web server. The file downloads but will not open. Error says it's not a png file. There is nothing wrong with the png on the server, I can download through webmin and open it just fine. I use this code a lot downloading jpgs and never had a problem. The download path on the server is correct, I have been staring at it for hours so it is right. Is there something about downloading and saving a png that I am missing? Should I do something different for png files?
Dim pc As Picture
Try File.save("/home/rjr/test/1/channimg.png", HttpClient.Download("http://192.168.1.72/imgs/1/channimg.png"))
If Error Then
'image not on server
Message("cant find image")
Else
'show img
pc = Picture.FromString(File.Load("/home/rjr/test/1/channimg.png"))
PictureBox1.Picture = pc
Endif