Education/Projects/ProcessingForTheWeb/Performance: Difference between revisions

m
no edit summary
No edit summary
mNo edit summary
Line 17: Line 17:


'''F100)''' '''SVG Tiny 1.2 XML File to Canvas Pixel Array'''  
'''F100)''' '''SVG Tiny 1.2 XML File to Canvas Pixel Array'''  
<blockquote>This would be of great benefit the Processing.js project. Several people also requested this functionality at the SVGOpen conference 2009. Ideally the Canvas could natively rasterize a Tiny SVG directly to a pixel array. I spoke about this with Jonathan Watt who suggested this could potentially be a major security issue. So it may be that we are forcedto render SVGs to the Canvas with Javascript. Simple enough to acheive, but at a significant cost to performance.<br></blockquote><blockquote>I do not see how passing SVG graphics to a pixels array would be any less secure than passing graphics from the Canvas toDataURL. To be clear, I am not suggesting that we rasterize an SVG that is already live in the DOM ( I could see why that could leak information ), I am requesting the ability to render a Tiny SVG from an XML file into a pixel array.<br></blockquote><blockquote>'''Existing Canvas ToDataURL Method: '''https://developer.mozilla.org/En/Code_snippets/Canvas http://www.nihilogic.dk/labs/canvas2image/<br></blockquote>
<blockquote>This would be of great benefit the Processing.js project. Several people also requested this functionality at the SVGOpen conference 2009. Ideally the Canvas could natively rasterize a Tiny SVG directly to a pixel array. I spoke about this with Jonathan Watt ( a Mozillan working with the SVG implementation ), who suggested this could potentially be a major security issue. So it may be that we are forced to render SVGs to the Canvas with Javascript. Simple enough to acheive, but at a significant cost to performance.<br></blockquote><blockquote>I do not see how passing SVG graphics to a pixel array would be any less secure than Firefox's current method of passing graphics from the Canvas toDataURL. To be clear, I am not suggesting that we rasterize an SVG that is already live in the DOM ( I could see why that could leak information ), I am requesting the ability to render a Tiny SVG from an XML file into a pixel array.<br></blockquote><blockquote>'''Existing Canvas ToDataURL Method: '''https://developer.mozilla.org/En/Code_snippets/Canvas http://www.nihilogic.dk/labs/canvas2image/<br></blockquote>
69

edits