waveform display in browser

no, N bits per colour with a 3*2^N table ( 1

Reply to
Jasen Betts
Loading thread data ...

Replacing decades of hard-learned experience that's been distilled into the minimum possible code that actually handles all the warts of all the weird-ass browser versions out there, with some shit you just invented by believing the standards which almost nothing actually complies with is...

a *guaranteed* recipe for almost immediate failure.

Reply to
Clifford Heath

Reply to
Jasen Betts

Likewise, the bitmap doesn't need to be generated all at once. It can be generated one pixel at a time and sent out immediately requiring no bitmap storage at all. I considered doing this in a small oscilloscope once where the image would be generated in the chip and sent out a port rather than stored. Much of the display is fixed or text with the traces impacting the display in an easy to calculate manner... at least easy in a chip with many fast ALUs which sounds a lot like an FPGA to me.

--

Rick
Reply to
rickman

You can calculate the bitmap within the browser. Here a minimal html file which displays a random bitmap:

window.onresize = resize; function resize(){window.location.href=window.location.href;} var intFrameWidth = window.innerWidth-16; var intFrameHeight = window.innerHeight-24; document.write('');

var canvas = document.getElementById('Canvas'); var context = canvas.getContext('2d');

// Creates an Image Object of size intFrameWidth * intFrameHeight var imageData = context.createImageData(intFrameWidth, intFrameHeight);

// Takes data in the Canvas Pixel Array var CanvasPixelArray = imageData.data;

// Calculate total no of pixels var total_pixel = imageData.width*imageData.height;

// Random RGBa values for each pixel for (var i = 0; i < total_pixel; i++) {CanvasPixelArray[i*4] = Math.floor(Math.random()*255); CanvasPixelArray[i*4+1] = Math.floor(Math.random()*55); CanvasPixelArray[i*4+2] = Math.floor(Math.random()*155); CanvasPixelArray[i*4+3] = 255; };

// Display the Image context.putImageData(imageData, 0, 0);

Reply to
Herbert Kleebauer

You're making shit up.

I just made a gif file here that's 73 bytes. explain that.

1 bit per pixel (before compression) monochome gifs were done and other colour depths too. the palette is variable length (I can't remeber if it's fixed to 2^n slots or allowed to be intermediate sizes. GIF was invented in 1987 when very few people had 8-bit colour displays.

jasen@fozzie:~$ cat 1.pbm P1

1 1 1 jasen@fozzie:~$ convert 1.pbm 1.gif jasen@fozzie:~$ ls -l 1.gif

-rw-r--r-- 1 jasen jasen 73 Jul 25 21:14 1.gif jasen@fozzie:~$ giftrans -l 1.gif Global Color Table: Color 0: Red 0, Green 0, Blue 0, #000000 (black, gray0, grey0) Color 1: Red 255, Green 255, Blue 255, #ffffff (white, gray100, grey100)

--
umop apisdn
Reply to
Jasen Betts

that doen't matter because browsers only get better, if you write good javascript that works today. it will still work in 10 years.

replacing 100 lines of well written javascript with 3000 lines is not likely to help long-term reliability.

--
umop apisdn
Reply to
Jasen Betts

Those sections are talking about the color table. The index is still a maximum of 8 bits, because it's defined by the 3 bit value (which stores the exponent-1).

I thought that your original claim was that each pixel has 3 colours independent of any table, but I think I misinterpreted you and we've been talking past each other. Sorry about that.

Reply to
Clifford Heath

I guess the only format I ever worked with in TIFF was the run-length encoduing used by faxes. I had forgotten there were other options for compression.

It's good to hear that SVG support is common enough to be useful.

The last time I needed to do data plots on web pages was something like 6-7 years ago, and SVG was a bit too bleeding edge at the time.

--
Grant
Reply to
Grant Edwards

Blocking flash (with an optional white-list) is absolutely essential to making the 'web a useful place. Unless it's a site providing someting I desperately need, I usually just completely avoid web sites that require flash to get something done.

--
Grant
Reply to
Grant Edwards

finding the information is only part of the problem, YOU also need to understand it.

That pretty-much as I remember it from the early 90s.

hmm, seaction 19 and section 21. say something very similar to 3*2^N

  1. Table Based Image Data. "LZW Minimum Code Size" see appendix F for it's significgance starting at "ESTABLISH CODE SIZE" what it means is that the actual data is N-bit indices into the color table, because indices 2^N and above cannot be coded.

if that's too complicated, see this part ot the wikipedia page:

formatting link

--
umop apisdn
Reply to
Jasen Betts

One of my guys threw this together pretty fast:

formatting link

It uses javascript to generate a sine wave and pushes SVG into the browser to plot it. Seems fine under Firefox. It's only 250 points and looks pretty good.

It doesn't look hard to have my tachometer box digitize waveforms (AD7276 maybe) and display in the browser, without loading any apps or anything.

--
John Larkin         Highland Technology, Inc 
picosecond timing   precision measurement  
 Click to see the full signature
Reply to
John Larkin

Hi,

if I am not too late with the answer.

Red Pitaya

formatting link
is... I will skip all marketing shit... providing the scope application. It is running on GNU/Linux (on Xilinx Zynq) and nginx web-server (patched to support some nice things). Web page is written mostly with HTML5 and Javascript. You can check the web page for scope:

formatting link

You will see that in fact most of the backend is running from modules in nginx - but generally it should be good starting point to make a webpage with oscilloscope graphs (resizing, panning, ...).

I think also all the libraries should be 'free to use' (I am not sure about licenses directly).

Hope it helps.

Jure Menart

--------------------------------------- Posted through

formatting link

Reply to
jurem

Nice. I'll have to toss that into my EM simulator at some point.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
 Click to see the full signature
Reply to
Phil Hobbs

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.