1/* 2 3CanvasGrayscale - InfinitySlider Extension 4Version: 1.0 5Author: Epeo 6Website: demo.epeo.it/infinityslider 7 8*/ 9function canvasGrayscale (valuecanvas, valuewidth, valueheight) { 10 var canvas = valuecanvas; 11 var width = valuewidth; 12 var height = valueheight; 13 14 var context = canvas.getContext("2d"); 15 imageData = context.getImageData(0, 0, width, height); 16 px = imageData.data; 17 length = px.length; 18 19 for (var i = 0; i < length; i += 4) { 20 gray = px[i] * .3 + px[i + 1] * .59 + px[i + 2] * .11; 21 px[i] = px[i + 1] = px[i + 2] = gray; 22 } 23 24 context.putImageData(imageData, 0, 0); 25}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.