Fun with code (since 2006)

Live JPEG Encoder 0.3


09.08.06 Posted in Actionscript 3, ByteArray by

Application :

A Flash animation should have appeared here, but it seems that your browser has an older version of the Flash Player or it is not installed at all. Please, install the last release of the Flash Player now, then reload this page.

Here is an application i had to develop in Actionscript 3, it lets you capture any content into a JPEG file (JPEG Encoding corelib class) with quality settings and size infos, you can choose between two modes, that lets you save the file on the server or your hard-disk.

Updated on the 09/20/06 : added FLV playback features

Updated on the 10/04/06 : added video navigation bar

Sources : Download

New AMFPHP Version available here



81 Responses to “Live JPEG Encoder 0.3”

  1. Inder says:

    Thank You so Much Thibault Imbert
    It is really great. it is working amazing.
    Thanks

  2. [...] Here’s how it works. There are some rather annoying, but necessary, limitations in flash that make it a little difficult to use as an editor for personal files. To load an image to  edit, it must first be uploaded by flash to the web server hosting the flash file, and then re-downloaded into the flash player. This part isn’t too tough. Then there’s the issue of the image generation. The user needs to be able to get to the image after it’s captioned. It is technically possible to encode jpegs in flash  but this puts more bandwidth strain on the server and the user, seeing as the result would then have to be uploaded to the server, and then re-downloaded by the user.. Blech! not to mention, these files can get BIG. So, I got to thinking that Flash can just send the server a representation of the caption, and then server side scripts can render the image, and then flash can pull that image back in, and throw it up onto the webpage for download with some DHTML goodness! [...]

     
  3. can't make it work says:

    hi, no working, no movie show

  4. [...] W AS3, dzięki klasie ByteArray, mamy możliwość operowania danymi binarnymi. Wykorzystując tą możliwość, powstało szereg przydatnych bibliotek, które umożliwiają bezpośrednio we flashu np. kompresję zip, jpg, png, etc. Mnie na razie najbardziej zainteresowała klasa JPEGEncoder. [...]

     
  5. Jeff says:

    Although the current Flash implementation doesn’t allow client-side access to user-selected files, you guys might be interested to know that Silverlight *does* allow this. Google the silverlight project: “Fluxify” to see an example of this.

  6. Jeff says:

    Is the source no longer available????

  7. Thibault Imbert says:

    Hi Jeff,

    Just fixing a bug on the server, I will post them back tomorrow ;)

    kind regards

  8. Aaron Nicholson says:

    Hi there,
    I’d love to use the non-AMFPHP version of this, but can’t find a link to the code. Where can I find your code?
    Thanks a lot btw. This should make things a lot easier.
    A

  9. Aaron Nicholson says:

    Re: my last post. I see a link to the source in an earlier comment, but it gave me a 404.

  10. Hi,

    I have been looking for something like this. where can I get the source – the link doesn’t seem to work for me.

    Thanks
    Rich

  11. Thibault Imbert says:

    Hi Richard,

    I will re-upload the sources tonight :)

    regards,

    Thibault

  12. Thomas says:

    Hey ! nice class, but there is a solution to encode a JPG with 300 dpi instead of 72 dpi ?

    Where the modification to do it should be ? In JPG Encoder class or in the class witch use it ?

    thanks

  13. Thomas says:

    I found a solution, change in “writeAPP0″ function

    this :
    writeByte(0); // xyunits
    writeWord(1); // xdensity
    writeWord(1); // ydensity

    into this :

    writeByte(1); // xyunits
    writeWord(0x12c); // xdensity
    writeWord(0x12c); // ydensity

  14. Thibault Imbert says:

    Hi everybody,

    I re-uploaded the sources :

    http://www.bytearray.org/wp-content/projects/postjpegencoder/standard_jpeg_encoder_source_03.zip

    cheers ;)

    Thibault

  15. Javier says:

    I wondering how i can capture one Movie Clip and not the video

  16. Sam says:

    Brilliant. Found this really useful on a project i was working on.

  17. kevin says:

    Wow, this is awesome! I have looked through the source and haven’t found anywhere if this holds a license or freely available for use by anyone. Is this possible to use on my website?

  18. Robert Sumazinklle says:

    Hello mate, i have some problem when I’m going to save to server.
    I’m using this to the URLRequest
    var myRequest:URLRequest = new URLRequest ( _assets.bt_enviar.selected ? “http://localhost/sites/rba/deploy/Main.html?name=snapshot.jpg” : “http://localhost/sites/rba/src/php/create2.php?name=snapshot.jpg” );

    Is this the way to use it? Main.html?name=snapshot.jpg ?

    When I click at the save button the File Browser opens to save the image.

  19. Robert Sumazinklle says:

    I got a error.

    Error: Error #2101: The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs.

    I try to use the loader.dataFormat to VARIABLES but have no success.

    Could you help me?
    Thanks in advance!

  20. [...] Save JPEG images from webcam (thanks to Thibault Imbert’s AS3 JPEG encoder) [...]

     
  21. James Anelay says:

    Hi, Greate Work. Is it possible to get a response from the php script once the file has uploaded. and then run another function depending on weather the response was a sucessful one?

  22. James Anelay says:

    Ignor that last message I completely missed the onImageComplete message.

  23. James Anelay says:

    Hi, I’m using your code, but I want to only allow one image to be taken per day, therefor it needs to be re-written, and I show it on the same page using jquery without reloading the page is there a way to stop that image being cached by broswers, so when I remove it and add it again with jquery it changes?

  24. guiguizmo says:

    Bonjour Thibault,

    J’ai un soucis avec la sauvegarde sur le serveur. J’ai mis en ligne ton appli mais quand je clic sur sauvegarder sur le serveur, j’ai le movieClip “loading” qui apparait et ne disparait pas … et l’image n’est pas sauvegardée. Y a t il des droits d’acces a regler ?

    Merci.

  25. Luis says:

    HI,
    Excellent example, I was wondering, Do you think that it is possible to save a piece a video (Binary possibly) and send it to a server? (more likely with php and Post)
    Regards,
    Luis.

  26. Aldo Marsilio says:

    Is there a way to track the progress of the data submitted by post method?

  27. [...] speeding things up by reducing the data transferred. I encoded the BitmapData in flash to JPEG with JPEGEncoder and then to a Base64 string what reduced the data enormously, but that would mean to decode it in [...]

     
  28. Chris Fulton says:

    Here is a much simpler video poster frame grabber inspired by Live JPEG Encoder and other examples.

    http://www.masonqm.com/articles/Poster-Frame-Generator-0-02-Released-125.html

  29. paranoio says:

    this gave me the idea of creating a DVR functionality into any video or animation , by using bitmapdata and creating a frame history

    its limited by the memory but i guess its a good proof of concept

    http://blog.motion.com.mx/general/video-con-repeticion-instantanea-con-flash/

  30. sam says:

    Hey Thibault,

    I’m trying to take a screenshot with this functionality on your SimpleStageVideo. But is unsuccessful in capturing it with BitmapData. any ideas why?

Leave a Reply

Open Sort Options

Sort comments by:
  • * Applied after refresh

ByteArray.org
Fun with code since 2006.