But, before proceeding, it may be valuable to look at the cautionary tale of GIF and GIF patents.
GIF (Graphics Interchange Format) was adopted by CompuServe in 1987 when bandwidth on dialup connections made the high degree of compaction very desirable. Originally used for static images, it was found possible to extend the GIF standard to provide limited animation. GIF images were easy to import into Java applets for animation and generally the most common image format by far.
Unfortunately, it later turned out that the compression method, known as Lempel-Ziv-Welch (LZW) data compression was a patented algorithm. The patents (1981, 1983) were assigned to the corporation which became Unisys. Many developers were very disturbed on hearing rumors that there might be litigation if they used the format. Thus there was a push to create PNG to both improve image fidelity and avoid patents. Partly as a result of the GIF story, it is not an exaggeration to say that there is a great deal of paranoia in the developer community about software patents. Fortunately the LZW patents have expired as of 2003.
Note that the above issue of imaging patents – and others – hang over some of the HTML5 developments underway today.
Apple pioneered the canvas concept for use in their "WebKit" HTML layout engine. WebKit has been released as open-source and is used in Apple's Safari browser and Google's Chrome browser. The Web Hypertext Application Technology Working Group (WHATWG), created to develop standards independently from the W3C in 2004, adopted canvas as part of the web extensions that have become HTML5. Initially, the question of Apple's patent rights caused some worry, but Apple has now agreed to follow the W3C's royalty-free patent licensing terms.
The canvas element in HTML5
var canvas = document.getElementById('the_canvas');
var context = canvas.getContext('2d');
So far in the existence of HTML5, the only competition for 2d context is "webgl" which gives you a 3D rendering API. The API is 3D because it knows about depth and which elements get drawn on top of other elements. WebGL is derived from the OpenGL ES 2.0 standard and provides similar rendering functionality, but in an HTML context.
The development of WebGL is manged by the Khronos Group, a not-for-profit industry group devoted to creation of open standard and royalty free graphic APIs.All major browser vendors except Microsoft are members of the working group. The final draft of WebGL version 1.0 was released February 18, 2011. This draft is expected to be very close to the final standard.
What about SVG?
All modern browsers except Microsoft IE (prior to version 9) support basic SVG graphics so in the future you will be able to choose SVG or canvas for dynamic graphics on web pages. Browsers on mobile devices may implement a reduced set of SVG functions. SVG is a W3C standard developed with the aid of a number of browser developers from major companies and apparently unencumbered with patent problems.
Developers are welcoming the HTML5 canvas as a standardized way to present video. Video presentation is so burdened with patent rights and battling codecs that it will take a whole separate article. Stay tuned.
Additional HTML5 resources
- HTML5 working draft of Jan 18, 2011 entitled "A vocabulary and associated APIs for HTML and XHTML" (W3C)
- Wikipedia entry on WebGL(Wikipedia)
- Home of WebGL at Khronos Group (Khronos Group)
- This Wikipedia article gives some historical background on the canvas element and origin as an Apple patented technology(Wikipedia)
- Wikipedia summary of SVG(Wikipedia)
- This Wikipedia article contains a summary of the GIF patent flap (Wikipedia)
- Summary of web graphics activities at the W3C (W3C)
This was first published in February 2011