2 Replies Latest reply on Sep 29, 2008 10:59 AM by JasonMH

    Embedding a mini webserver with AIR applications

    seme1 Level 1
      After failing to find a solution to the problem I mentioned here:

      I started looking for ways to use external libraries,, and possibly
      the GD Library.

      Is it possible to embed a mini web server with Adobe Air applications
      (along with the GD library) ?? Has anybody succeeded in achieving
      similar tasks ??

        • 1. Re: Embedding a mini webserver with AIR applications
          Joe ... Ward Level 4
          No there isn't a good way to do this from AIR. The biggest problem is that you couldn't start up the server from AIR, so a user would always need to start the server, then start your AIR app.

          You could use Pixel Bender to solve your image resizing quality problem. Pixel Bender is available in the Flash 10 beta now, and should be available in the next release of AIR. (See http://labs.adobe.com/wiki/index.php/Pixel_Bender_Toolkit.) Note that your image quality problem is not with the JPEG encoder, it is the resize operation. Since bitmap smoothing is not working for some reason, you get nearest neighbor sampling -- which produces the artifacts that you see in your images. Using Pixel Bender you could code your own resize filter that uses bilinear or even bicubic sampling.
          • 2. Re: Embedding a mini webserver with AIR applications
            I think I proposed this idea in another post. The web server would have to be installed separately and would be OS-specific. If you are really good at creating installers, you might be able to bundle a web server and an AIR app together to give your users a seamless install process. Otherwise, you could instruct them to download and run a separate installer containing your server.

            It should be easy to detect if they had installed the server just by checking the connection from within AIR.

            This is obviously a hacky approach, but it would allow you to do pretty much whatever you want on the machine.