Need javascript code to select polygonal area on an image

Discussion in 'Javascript' started by jvs_desg, Sep 27, 2007.

  1. jvs_desg

    jvs_desg Guest

    Hi All,

    I need to select some area on an image.
    But if used a freehand kind of drawing tool that would require lots of
    memory to store so many coordinates.
    Please help me in writing a script that can be used to select some
    polygonal area on
    the image, so that the number of coordinates can be reduced to
    minimum.

    Thanks in advance,
    Jd
     
    jvs_desg, Sep 27, 2007
    #1
    1. Advertising

  2. jvs_desg

    Doug Miller Guest

    In article <>, jvs_desg <> wrote:
    >Hi All,
    >
    >I need to select some area on an image.
    >But if used a freehand kind of drawing tool that would require lots of
    >memory to store so many coordinates.
    >Please help me in writing a script that can be used to select some
    >polygonal area on
    >the image, so that the number of coordinates can be reduced to
    >minimum.


    I'm not sure I understand why you want a script to do this; is there some
    reason you can't accomplish what you want by using a client-side image map?

    --
    Regards,
    Doug Miller (alphageek at milmac dot com)

    It's time to throw all their damned tea in the harbor again.
     
    Doug Miller, Sep 27, 2007
    #2
    1. Advertising

  3. jvs_desg

    pr Guest

    jvs_desg wrote:
    > I need to select some area on an image.
    > But if used a freehand kind of drawing tool that would require lots of
    > memory to store so many coordinates.
    > Please help me in writing a script that can be used to select some
    > polygonal area on
    > the image, so that the number of coordinates can be reduced to
    > minimum.


    If it's a user selection you want, the problem would be rendering its
    outline on the page. You would probably be looking at canvas

    http://developer.mozilla.org/en/docs/HTML:Canvas

    or SVG

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

    Or Flash.
     
    pr, Sep 27, 2007
    #3
    1. Advertising

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. Mark
    Replies:
    1
    Views:
    620
    Larry Barowski
    Jun 27, 2005
  2. hotadvice
    Replies:
    14
    Views:
    716
    hotadvice
    Oct 2, 2007
  3. Andy B.
    Replies:
    0
    Views:
    821
    Andy B.
    Apr 30, 2010
  4. palmiere
    Replies:
    1
    Views:
    431
    Erwin Moller
    Feb 9, 2004
  5. Jim
    Replies:
    0
    Views:
    197
Loading...

Share This Page