how to convert array or coordinates to image

Discussion in 'Javascript' started by Eadmund@letterbee.com, Dec 28, 2006.

  1. Guest

    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
     
    , Dec 28, 2006
    #1
    1. Advertisements

  2. yb Guest

    > 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.
     
    yb, Dec 28, 2006
    #2
    1. Advertisements

  3. pcx99 Guest

    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 <canvas> tag. 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.

    http://developer.mozilla.org/en/docs/Canvas_tutorial

    --
    http://www.hunlock.com -- Musings in Javascript, CSS.
    $FA
     
    pcx99, Dec 28, 2006
    #3
  4. In comp.lang.javascript message <
    legroups.com>, Thu, 28 Dec 2006 06:12:32, 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.com/faq/index.html>.
    <URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
    <URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
     
    Dr J R Stockton, Dec 29, 2006
    #4
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    22,185
    Jim Gibson
    Nov 4, 2003
  2. Janani via DotNetMonster.com

    Getting Jpeg Image Coordinates

    Janani via DotNetMonster.com, Jan 20, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    3,878
    =?Utf-8?B?U2NvdHQgU2ltb25z?=
    Jan 20, 2005
  3. Suresh  Kumar
    Replies:
    0
    Views:
    793
    Suresh Kumar
    Jul 3, 2003
  4. Suresh  Kumar
    Replies:
    0
    Views:
    727
    Suresh Kumar
    Jul 4, 2003
  5. Mike Solomon

    convert graphic file to x,y coordinates

    Mike Solomon, Apr 26, 2004, in forum: Perl Misc
    Replies:
    6
    Views:
    348
    Mike Solomon
    Apr 27, 2004
  6. Replies:
    1
    Views:
    787
    Roedy Green
    Aug 13, 2012
  7. clusardi2k
    Replies:
    1
    Views:
    1,027
    Roedy Green
    Aug 13, 2012
  8. leonardo
    Replies:
    0
    Views:
    265
    leonardo
    Nov 18, 2012
Loading...