dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: Convert a javascript progressbar to image

  1. #1
    Join Date
    Oct 2009
    Posts
    3

    Exclamation Convert a javascript progressbar to image

    In my application, we display a progressbar generated using javascript and css. The progress bar is displayed in a jsp page. Is there a way, I could capture this progressbar on page submit as a image(jpeg/png). Help on this will be highly appreciated.

  2. #2
    Join Date
    Sep 2009
    Location
    USA
    Posts
    34
    Hi,

    JavaScript renders everything as HTML. A JPEG is a rasterized image. Abstracting your question becomes somewhat as: "Can I convert code into an image?" - and this is not something JavaScript is equipped to do.

    The best you could do is to submit the progress of the progress bar to the server via an AJAX call. On the server have a graphics library (e.g. ImageMagick, GD) dynamically recreate the progressbar image using the coordinates you give it. This would really become overkill though, and my gut feeling tells me that there is a better solution for you than dealing with images.

    Let me know what your goal is and maybe I can suggest something better.

    Hope this helps.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles