• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sending an image on network..

 
Kutub Shaikh
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to get some idea on how to transfer an image on network, like encoding and decoding..

Thanx in advance
 
Reza Ravasizadeh
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure if it is possible or not but you should make an object that implement serializable(able to travel throught the wires) and the fastet way is to send it via java socket.
 
Ko Wey
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I'm not sure if it is possible or not but you should make an object that implement serializable(able to travel throught the wires) and the fastet way is to send it via java socket.


And the object must NOT extend Image because that one is not serializable...
 
Ko Wey
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By the way, if I want to save an image by "serialization", I store (and retrieve) the data from the image in an instance of this class. Not the sharpest tool int the box, but it serves me well! I hope you can use this.


 
Jeff Albertson
Ranch Hand
Posts: 1780
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gosh, hasn't any one heard about ImageIO?
 
Ko Wey
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ImageIO of course!!!

this program reads an image from file("test.jpg"),
then sends it to yourself(localhost) .... ends receives it and shows it!

so make an image "test.jpg", save in working directory,
compile ImagePost.java and run,
it should work!



 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic