Results 1 to 5 of 5

Thread: Sending a picture

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2005
    Posts
    67

    Sending a picture

    Can anyone suggest the easiest way of sending a picture from one app to another using winsock. The picture dimensions are 200x260 pixels always.

    Thanks

  2. #2
    PowerPoster
    Join Date
    Dec 2003
    Posts
    4,787

    Re: Sending a picture

    Quote Originally Posted by TheBoy
    Can anyone suggest the easiest way of sending a picture from one app to another using winsock. The picture dimensions are 200x260 pixels always.

    Thanks
    Welcome to the forums,

    http://winsockvb.com/article.php?article_id=37

    Does that help

    Pino

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Mar 2005
    Posts
    67

    Re: Sending a picture

    Yeah thanks, I have had a look and am gonna have a bash at it again.

    Cheers

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Mar 2005
    Posts
    67

    Re: Sending a picture

    Hi, thanks for showing me that program, it has helped a lot. A question though. I have tried running the program on my local machine, using 127.0.0.1, and when sending a picture, it sends it fine. However, when using the program over my 2 machines (over an internet connection), not all the picture is recieved. On a larger piucture it completely missed of the bottom half, and on a smaller picture, the bottom couple of lines were distorted.

    Any ideas??

    Thanks

  5. #5
    Member
    Join Date
    Feb 2005
    Location
    Usa Nyc
    Posts
    45

    Re: Sending a picture

    I can't really say anything since I don't know your code but heres a simple plan i would use if i were to send a picture.

    create winsocks
    bind them
    connect
    Open file in binary mode
    send a simple packet to tell the client your ganna be sending a picture
    wait for client response
    then read in from file and send packets..
    while the client is recieving the packets its triggered that its recieving a picture
    so it can easily write the file instead of checking if the packet is correct.

    This should work for receiving all the packets.
    Don't forget it has to be a tcp/ip connection.
    Kiss, Aerosmith, Black Sabbath, Nazareth, Judas Priest, Status Quo, Cinderella, Scorpions, Tool, SteppenWolf.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width