×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    23

    How to transfer Images over RFCOMM connection?

    Hello


    I'm looking for a way to transfer images over a SPP/RFCOMM connection. I am using bluecove.

    Some kind of way to generate out of a local saved image a String or a bytearray transfer it and generate back an image.

    What I'm looking for too is a way to resize images, actually only make em smaller. Best would be if that is possible on a PC (transferring a huge image which is bigger than the mobile phone cache and then trying to resize it is not really clever.)

    I hope somebody got help.


    thanks

    Jossi

  2. #2
    Registered User
    Join Date
    May 2006
    Posts
    23

    Re: How to transfer Images over RFCOMM connection?

    nice solution found on

    http://mindprod.com/jgloss/imageio.html#TOBYTES

    jpeg png convert byte array bytearray imageio image io
    example for testing


    BufferedImage bufImage = ImageIO.read( new File( filename ) );
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    ImageIO.write(bufImage, "png", baos);
    baos.flush();
    byte[] bytesOut = baos.toByteArray();
    baos.close();
    BufferedImage cImage = ImageIO.read(new ByteArrayInputStream(bytesOut));
    ImageIO.write(cImage,"png",new File ("testest.png"));

  3. #3
    Super Contributor
    Join Date
    Dec 2005
    Location
    Europe/Poland/Warsaw
    Posts
    1,697

    Re: How to transfer Images over RFCOMM connection?

    hi Jossi,

    to down-size images (rescale down) just use any of "make thumbnails" solutions,
    could be any for SE, say:
    http://schmidt.devlib.org/java/save-jpeg-thumbnail.html
    regards,
    Peter

Similar Threads

  1. RFCOMM, Serial Port Profile connection to PC with JAVA
    By SonixGer in forum Bluetooth Technology
    Replies: 6
    Last Post: 2005-09-05, 20:52
  2. No Data transfer = GPRS connection gets dropped off?
    By marcuswong in forum Nokia M2M
    Replies: 2
    Last Post: 2004-09-30, 12:20
  3. Replies: 0
    Last Post: 2004-08-10, 08:53
  4. RFCOMM connection: two-way?
    By xdimas in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2004-03-04, 07:56
  5. 7210 -> PC images transfer
    By CastelFamily in forum Digital Rights Management & Content Downloading
    Replies: 1
    Last Post: 2002-12-24, 08:33

Posting Permissions

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