| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <style> | 2 <style> |
| 3 canvas { | 3 canvas { |
| 4 width: 100px; | 4 width: 100px; |
| 5 height: 100px; | 5 height: 100px; |
| 6 image-rendering: pixelated; | 6 image-rendering: pixelated; |
| 7 } | 7 } |
| 8 </style> | 8 </style> |
| 9 <body> | 9 <body> |
| 10 <!-- The resulting image should be 100x100, consisting of 4 50x50 blocks of
solid color, with no blurring of edges --> | 10 <!-- The resulting image should be 100x100, consisting of 4 50x50 blocks of
solid color, with no blurring of edges --> |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 imageHandle.data[index++] = 255; | 40 imageHandle.data[index++] = 255; |
| 41 imageHandle.data[index++] = 255; | 41 imageHandle.data[index++] = 255; |
| 42 | 42 |
| 43 imageHandle.data[index++] = 0; | 43 imageHandle.data[index++] = 0; |
| 44 imageHandle.data[index++] = 0; | 44 imageHandle.data[index++] = 0; |
| 45 imageHandle.data[index++] = 0; | 45 imageHandle.data[index++] = 0; |
| 46 imageHandle.data[index++] = 255; | 46 imageHandle.data[index++] = 255; |
| 47 | 47 |
| 48 canvas.putImageData(imageHandle, 0, 0); | 48 canvas.putImageData(imageHandle, 0, 0); |
| 49 </script> | 49 </script> |
| OLD | NEW |