How To Question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Steven

    How To Question

    Greetings,
    This project, among other things, requires:
    1. the ability to capture a screen size image from a directory every x
    seconds (x= 1-5) and display this image to a publicly addressable web form
    without any screen flicker.
    Basically, we have a device that captures frames from one PC (1) and saves
    them to a directory on a different PC (2). The web app will be on the number
    2 PC.
    So far, I have created a web site with Ajax UpdatePanels,an Image control
    to display the image from the directory, and a FileSystemWatch er to capture
    and serve a .jpg to the Image control in the UpdatePanel. The UpdatePanel
    refresh is triggered by an AsyncPostBackTr igger and a Timer. This works,
    but because the image is large ( I guess), the screen flickers between image
    loads. My question is: is there a better way to do this?
    The aspx looks like this:

    <body>
    <form id="form1" runat="server">
    <asp:ScriptMana ger ID="ScriptManag er1" runat="server"
    EnableViewState ="false" EnablePartialRe ndering="true">
    </asp:ScriptManag er>

    <asp:Timer ID="Timer1" OnTick="Timer1_ Tick" runat="server"
    Interval='<%# GetTimerInterva l() %>' />

    <asp:UpdatePane l ID="UpdatePanel 2" runat="server" EnableViewState =
    "false" UpdateMode="Alw ays">
    <ContentTemplat e>
    <div align="center">
    Last Update:
    <asp:Label ID="dtMessage" runat="server"> </asp:Label>
    </div>
    </ContentTemplate >
    </asp:UpdatePanel >

    <asp:UpdatePane l ID="UpdatePanel 1" runat="server" EnableViewState =
    "false" UpdateMode="Alw ays">
    <ContentTemplat e>
    <div align="center">
    <asp:Image ID="Image1" runat="server"
    BackColor="DimG ray" OnDataBinding=" OnDataBinding" ImageUrl='<%# GetData()
    %>' />
    </div>
    </ContentTemplate >
    </asp:UpdatePanel >
    </form>
    </body>

    where GetData() returns the string url from the FileSystemWatch er's
    OnCreated event.

    Any advice on this matter would be greatly appreciated.

    Thank you,
    Steven


  • Ken Fine

    #2
    Re: How To Question

    Yes. I think you're using the wrong tool/presentational platform for the
    job, maybe.

    Have a look at Flash Actionscript or maybe Silverlight. Flash is performant
    in the ways that you're looking to make it work, and can be programmed to
    poll XML or to be addressed directly by various means; image data is loaded
    asynchronously. I've built things similar to what you're trying to make and
    they work well. You can effectively crossfade/transition between images/fade
    to black/fade to white("bleach fade") and it all looks smooth and
    aesthetically pleasing on the Flash player.

    More performance info that might help you: I just made a webpage that has
    four of these panels with crossfading images in each. Each panel is about
    350x 240. It works smoothly with no stutter on the average PC.

    -KF


    "Steven" <someone@somewh ere.comwrote in message
    news:OEzSo2xeIH A.4476@TK2MSFTN GP06.phx.gbl...
    Greetings,
    This project, among other things, requires:
    1. the ability to capture a screen size image from a directory every x
    seconds (x= 1-5) and display this image to a publicly addressable web form
    without any screen flicker.
    Basically, we have a device that captures frames from one PC (1) and saves
    them to a directory on a different PC (2). The web app will be on the
    number 2 PC.
    So far, I have created a web site with Ajax UpdatePanels,an Image control
    to display the image from the directory, and a FileSystemWatch er to
    capture and serve a .jpg to the Image control in the UpdatePanel. The
    UpdatePanel refresh is triggered by an AsyncPostBackTr igger and a Timer.
    This works, but because the image is large ( I guess), the screen flickers
    between image loads. My question is: is there a better way to do this?
    The aspx looks like this:
    >
    <body>
    <form id="form1" runat="server">
    <asp:ScriptMana ger ID="ScriptManag er1" runat="server"
    EnableViewState ="false" EnablePartialRe ndering="true">
    </asp:ScriptManag er>
    >
    <asp:Timer ID="Timer1" OnTick="Timer1_ Tick" runat="server"
    Interval='<%# GetTimerInterva l() %>' />
    >
    <asp:UpdatePane l ID="UpdatePanel 2" runat="server" EnableViewState =
    "false" UpdateMode="Alw ays">
    <ContentTemplat e>
    <div align="center">
    Last Update:
    <asp:Label ID="dtMessage" runat="server"> </asp:Label>
    </div>
    </ContentTemplate >
    </asp:UpdatePanel >
    >
    <asp:UpdatePane l ID="UpdatePanel 1" runat="server" EnableViewState =
    "false" UpdateMode="Alw ays">
    <ContentTemplat e>
    <div align="center">
    <asp:Image ID="Image1" runat="server"
    BackColor="DimG ray" OnDataBinding=" OnDataBinding" ImageUrl='<%# GetData()
    %>' />
    </div>
    </ContentTemplate >
    </asp:UpdatePanel >
    </form>
    </body>
    >
    where GetData() returns the string url from the FileSystemWatch er's
    OnCreated event.
    >
    Any advice on this matter would be greatly appreciated.
    >
    Thank you,
    Steven
    >

    Comment

    Working...