Re: [Gambas-user] Using a socket to download an image. Please Help ^_^

2008-12-10 Thread Lars Hoeger
richard terry schrieb: > On Mon, 1 Dec 2008 06:50:06 am Robert Moss wrote: > > Robert this may not be much help to you and I'm not sure how related to your > problem it is, but just on the off chance. I struggled with saving a picture > and retrieving from a postgres field. > > The code I inclu

Re: [Gambas-user] Using a socket to download an image. Please Help ^_^

2008-12-01 Thread Benoit Minisini
On dimanche 30 novembre 2008, Robert Moss wrote: > The ImgData stops writing when it comes to a byte with value &H00 (I > believe) although I'm pretty sure it doesn't matter how I write the stream, > once it's read as a String, it becomes terminated by any NULL char. So my > question is this: How d

Re: [Gambas-user] Using a socket to download an image. Please Help ^_^

2008-11-30 Thread Ron
I use this to fetch an jpg image from my videoserver and store in my MySQL db. Maybe it can help you guys. PRIVATE hDownloadImage AS NEW HttpClient PRIVATE sGetImgUrl AS String PRIVATE iCamPub AS Integer ' ' grab image from channel #iCam

Re: [Gambas-user] Using a socket to download an image. Please Help ^_^

2008-11-30 Thread richard terry
On Mon, 1 Dec 2008 06:50:06 am Robert Moss wrote: Robert this may not be much help to you and I'm not sure how related to your problem it is, but just on the off chance. I struggled with saving a picture and retrieving from a postgres field. The code I included worked really well for a long t

Re: [Gambas-user] Using a socket to download an image. Please Help ^_^

2008-11-30 Thread Robert Moss
The ImgData stops writing when it comes to a byte with value &H00 (I believe) although I'm pretty sure it doesn't matter how I write the stream, once it's read as a String, it becomes terminated by any NULL char. So my question is this: How do I read the data from the Socket in binary, write it to

Re: [Gambas-user] Using a socket to download an image. Please Help ^_^

2008-11-30 Thread Robert Moss
Sorry that's not it, I mis-copied the line, in the actual code it does Mid(sData, p1 + 4) On Sun, Nov 30, 2008 at 2:39 AM, Doriano Blengino < [EMAIL PROTECTED]> wrote: > Robert Moss ha scritto: > > I am trying to get an image (or any binary data) downloaded from a > website > > and into a jpg fil

Re: [Gambas-user] Using a socket to download an image. Please Help ^_^

2008-11-30 Thread Doriano Blengino
Robert Moss ha scritto: > I am trying to get an image (or any binary data) downloaded from a website > and into a jpg file. I expect I will need to use the Byte[] datatype, but I > absolutely can NOT use Callbacks when the data comes in this time. > > ... > > DO UNTIL(EOF(#Sock)) > READ #Sock,

[Gambas-user] Using a socket to download an image. Please Help ^_^

2008-11-30 Thread Robert Moss
I am trying to get an image (or any binary data) downloaded from a website and into a jpg file. I expect I will need to use the Byte[] datatype, but I absolutely can NOT use Callbacks when the data comes in this time. Here is my example: DIM RequestString as string DIM sTotal as string DIM sBuf a