• Post Reply Bookmark Topic Watch Topic
  • New Topic

Image Transfer Using I/O  RSS feed

 
vaibhav punekar
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I m working on Image processing.I wish to transfer images from one location to another.I used DataOutputStream .It works fine for .bmp but .jpg and .gif gives"error reading file" when I open trasfered image.
How I can pass url(eg.e:\vaibhav\test.bmp)in string form so that I can tranfer the image to the desired folder through outputstream.It works fine for the same folder.
please it is urgent cos I m not finding remedy since a week.
More queries on this topic follows So gurus please be ready.Any good book for "Image processing In Java"?
Thanks.
 
Peter Tran
Bartender
Posts: 783
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vaibhav,
This program worked on a jpg file.

You should be able to adapt it using different streams if required.
-Peter
[This message has been edited by Peter Tran (edited January 20, 2001).]
 
vaibhav punekar
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks peter it's working fine for all types.How couldn't I know such simple thing.I was making changes to BufferedReader which I was using.Doesn't it work for READER WRITER classes?becase in your code you have used streams only.
I would have appreciated if I could have found the solution myself.But thanks anyway.
 
Brian Snyder
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Brian Snyder:
[B]I've used the above code myself, but it is too SLOW!!!
I have 225 JPEG's I need copied and it takes over 5 minutes. Using My Computer in Windows takes under 1 minute.
I've used :
This is QUICK!!! The only problem is that the old file is gone. How can I just 'copy' quickly and not 'cut and paste' ?
Many thanks in advance!! [/B]

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!