I want to render plots as images in an http client (browser) using scripting inside an HTML document. The scripting will be using the browser-specific functions for any particular browser. For the time being, I will be writing script that likely makes use of ActiveX objects in MSIE and XPCOM/XPConnect for Mozilla/Firefox, and any other browser that incorporates these interfaces.
The steps are fairly routine: 1. The user specifies the plot (x,y) data through an interactive HTML form interface (its elements). 2. Upon receiving a click event that all data is entered, the script renders a bitmap which is then formatted to the GIF specification. 3. An OBJECT node (element) is created and its 'type' and 'data' attributes appropriately set. 'type' is 'image/gif' and 'data' is encoded binary of the GIF data (encoding likely to be base64). The problem is step (2). I have not toyed with core Javascript sufficiently to know if binary data sequences can be manipulated. They certainly cannot be manipulated using Strings. It is possible that they can be manipulated as Array objects (with Unicode elements? Number-type elements?). If someone has had some success in this area, I would appreciate knowing, so that my time spent in experimentation is reduced (and possibly not even wasted). I want to do some testing using files as well, so the file I/O read() and write() functions must do something other than using or returning String objects. One post I read elsewhere talked of trying to deal with I/O and binary data in chunks of long numbers: so does does code like: numeric_type_data = Number(read(x_bytes)); or write(numeric_data); work? (I have heard of and am aware of the use of SVG to do this, but I can take less time to set up script to prepare an object whose data is a GIF- formatted file than I can find the time to wade through 700-page SVG specification and then code that to do what I want.) _______________________________________________ Mozilla-xpcom mailing list [email protected] http://mail.mozilla.org/listinfo/mozilla-xpcom
