Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > how to convert array or coordinates to image

Reply
Thread Tools

how to convert array or coordinates to image

 
 
Eadmund@letterbee.com
Guest
Posts: n/a
 
      12-28-2006
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

 
Reply With Quote
 
 
 
 
yb
Guest
Posts: n/a
 
      12-28-2006
> 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.

 
Reply With Quote
 
 
 
 
pcx99
Guest
Posts: n/a
 
      12-28-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) 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
 
Reply With Quote
 
Dr J R Stockton
Guest
Posts: n/a
 
      12-29-2006
In comp.lang.javascript message <(E-Mail Removed)
legroups.com>, Thu, 28 Dec 2006 06:12:32, (E-Mail Removed) 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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
convert graphic file to x,y coordinates Mike Solomon Perl Misc 6 04-27-2004 08:33 AM
Convert coordinates XY into LAT-LONG steeve.nadeau@mobilair.qc.ca Perl 1 11-04-2003 08:20 PM
Converting canvas coordinates to window coordinates in tkinter......... Suresh Kumar Python 0 07-04-2003 10:14 AM
Converting canvas coordinates to window coordinates....... Suresh Kumar Python 0 07-03-2003 04:53 AM



Advertisments