3 Replies Latest reply on Dec 7, 2015 6:20 AM by Bruce Bullis

    Import image from HTTP




      I'm creating a HTML extension that, among other things, grabs an image from a webserver and imports this image to the bin/timeline.


      By using the sample Importer from CEP on github, I can import local images to the timeline. But I'm not quite sure what would be the best solution to import an image from and HTTP-address? As far as I can understand Premiere don't allow this natively. I'm thinking of two solutions here, and wonder if anyone have any advise or could help me in the right direction:


      1. Create a solution that downloads the image from the webserver to a local disk, and then import this image to Premiere.


      2. Is it possible to convert the image from the weblocation to a base64, and then import this stream as an image to Premiere? I tried googling and searching the forums for this, but with no luck.


      Any help would be appreciated!

        • 1. Re: Import image from HTTP
          Bruce Bullis Adobe Employee

          Download the file first, then import. PPro needs footage to be from either:


               + a local path

               + mapped network drive (Windows)

               + mounted network volume (Mac)

               + UNC path

          • 2. Re: Import image from HTTP
            christiane82240841 Level 1

            Thank you bbb_999!

            I have created a solution that downloads the image first, and it works very well.


            I have another question not related to the first question:


            Is it possible to save a frame of the current output of the active sequence? I have already tried the function exportCurrentFrameAsPNG in the sample project, but to me it looks like exportframepng is no longer a valid function in the DOM? Is this correct?

            Is there any other way to get the output, ether as file or a byte array?


            I want this export to happen without the users knowledge, as this image will be a preview on an external HTMLserver.

            • 3. Re: Import image from HTTP
              Bruce Bullis Adobe Employee

              exportCurrentFrameAsPNG works great. Where are you seeing it fail? [Are you not calling app.enableQE() before using it?]


              Not sure how you're going to get an image without the user knowing about it; PPro only calls panels in response to user interaction with panels.