how to convert array or coordinates to image

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Eadmund@letterbee.com

    how to convert array or coordinates to image

    Hi,

    Pretty sure this is a non starter, but does anyone know how to convert
    an array of x-y coordinates, plotting a shape, in to a image (BMP, GIFF
    etc) in javascript?

    Regards

    Eadmund

  • yb

    #2
    Re: how to convert array or coordinates to image

    Pretty sure this is a non starter, but does anyone know how to convert
    an array of x-y coordinates, plotting a shape, in to a image (BMP, GIFF
    etc) in javascript?
    Can't be done in javascript (at least not for all web browsers), you
    won't be able to create an image file.

    Comment

    • pcx99

      #3
      Re: how to convert array or coordinates to image

      Eadmund@letterb ee.com wrote:
      Hi,
      >
      Pretty sure this is a non starter, but does anyone know how to convert
      an array of x-y coordinates, plotting a shape, in to a image (BMP, GIFF
      etc) in javascript?
      >
      Regards
      >
      Eadmund
      >
      Check out the <canvastag. It's supported in firefox and opera and
      there are hacks which get it to work in IE. It's the wave of the future
      and should be pretty standard to most working browsers in 2008.

      This tutorial describes how to use the element to draw 2D graphics, starting with the basics. The examples provided should give you some clear ideas about what you can do with canvas, and will provide code snippets that may get you started in building your own content.


      --
      http://www.hunlock.com -- Musings in Javascript, CSS.
      $FA

      Comment

      • Dr J R Stockton

        #4
        Re: how to convert array or coordinates to image

        In comp.lang.javas cript message <1167315151.984 603.45200@a3g20 00cwd.goog
        legroups.com>, Thu, 28 Dec 2006 06:12:32, Eadmund@letterb ee.com posted:
        >
        >Pretty sure this is a non starter, but does anyone know how to convert
        >an array of x-y coordinates, plotting a shape, in to a image (BMP, GIFF
        >etc) in javascript?
        You could, of course, write the logic to encode the shape as an array of
        byte-sized numbers matching the desired content of the BMP file (and
        similarly with more effort for other formats). From that, generate,
        still using javascript, a DEBUG script which will create that file.
        Write it to a new window, and write instructions to Select All on that
        window, copy to clipboard, and paste into DEBUG.

        It's a good idea to read the newsgroup and its FAQ. See below.

        --
        (c) John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v6.05 IE 6
        news:comp.lang. javascript FAQ <URL:http://www.jibbering.c om/faq/index.html>.
        <URL:http://www.merlyn.demo n.co.uk/js-index.htmjscr maths, dates, sources.
        <URL:http://www.merlyn.demo n.co.uk/TP/BP/Delphi/jscr/&c, FAQ items, links.

        Comment

        Working...