Results 1 to 3 of 3
  1. #1
    hoobajue is offline Member
    Join Date
    Aug 2010
    Posts
    2
    Rep Power
    0

    Question Simple Java image stream display

    I recently created an application in vb.net which takes a snapshot of
    the desktop and saves it as a jpeg (filename = "1.jpg") every 300 ms.

    I would like to be able to display the updated picture every time the
    image gets update. For example I would like to implement a sort of
    streaming web cam server which can be viewed with a browser, but
    without the webcam and using a local image.

    I tried one solution but there was a problem when the java was trying
    to read while the VB.net app was trying to write.

    Is there anyway which I would be able to display the image in a browser
    as the images are being updated by the vb app?

    Thanks for your help!

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,784
    Rep Power
    25

    Default

    Could you have a series of image files: 1.jpg 2.jpg, ... and wrap the number around back to 1 at the end of the series.
    Have the vb program save the image with a temp name and then rename it to the next file in the series in one step so there isn't a collusion of writing and reading. The date of the file could be used to determine the last image saved.

    anyway which I would be able to display the image in a browser
    What is the configuration of your system? Server, vb program, java program, client viewing images in browser.

    Javascript has a timer that you could use to get images to display in a browser.
    Last edited by Norm; 08-16-2010 at 11:44 PM. Reason: add JS idea

  3. #3
    hoobajue is offline Member
    Join Date
    Aug 2010
    Posts
    2
    Rep Power
    0

    Default

    I tried something similiar to what you are proposing (sequenced images) but, there would
    eventually be a conflict between the two programs.

    Now that I think of it I had them running at different speeds for example the vb was updating every 300ms while the java was 500ms... which would eventually give me a
    conflict no matter what...

    Hrmm thank you for your response! I think you jostled something in my brain, I'm going to try something tonight and will let you know how it turns out.

    Thanks, Mike

Similar Threads

  1. Can't display image icons on simple demo
    By roadrash in forum New To Java
    Replies: 4
    Last Post: 11-05-2009, 04:27 PM
  2. Simple Calculator Display Problem :(
    By jimbob in forum Java Applets
    Replies: 4
    Last Post: 07-18-2009, 05:13 AM
  3. raw byte stream to image
    By nupurashi in forum Advanced Java
    Replies: 2
    Last Post: 01-29-2009, 08:48 AM
  4. Help Needed, simple jframe display
    By typh0n in forum New To Java
    Replies: 7
    Last Post: 10-03-2008, 02:06 AM

Posting Permissions

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