Hi David, 

 

Thanks for the reference. It's quite a thorough consideration! The use cases
they present are important ones. I had always assumed that the most useful
thing about <canvas> was its potential for giving us pixel information from
SVG images (currently unavailable within SVG), so it is disheartening to
learn that this utility is almost non-existent (but for the server-side
rasterization and round-tripping, or workarounds like
http://code.google.com/p/canvg/).  Accordingly, I hope that the authors'
recommendation of  a  SVG.toDataURL()  method is taken seriously by the SVG
WG. The authors' conclusion that "The current security model is too tight
for effective interaction with SVG. " is one I would completely agree with. 

 

Cheers

David

From: [email protected] [mailto:[email protected]]
On Behalf Of David Leunen
Sent: Friday, April 29, 2011 4:20 AM
To: [email protected]
Subject: Re: [svg-developers] SVG inside <canvas>

 

  

David,

I think the pixel manipulation failure is not a bug, but a security feature.

See
http://paksula.users.cs.helsinki.fi/svg_open_2010/demo.xhtml
http://paksula.users.cs.helsinki.fi/svg_open_2010/demo-full.xhtml
and
http://www.svgopen.org/2010/papers/62-From_SVG_to_Canvas_and_Back/index.html
for explanations.

A canvas has an "origin-clean" flag that can be "dirty" which makes it
"write-only".

On Thu, Apr 28, 2011 at 9:50 PM, David Dailey <[email protected]
<mailto:ddailey%40zoominternet.net> >wrote:

> Compare the two files at
>
> http://srufaculty.sru.edu/david.dailey/svg/recent/htmlsvgcanvas7a.htm
>
> and
>
> http://srufaculty.sru.edu/david.dailey/svg/recent/htmlsvgcanvas7b.htm
>
>
>
> The first merely loads a jpg bitmap into a <canvas> and an SVG file into
an
> <embed> (I was using <img> instead, but some browsers seemed unhappy with
> me
> for that)
>
>
>
> When the button is pushed, a part of the canvas is read as a pixel array,
> manipulated and then redisplayed. It works just fine in IE9, Opera, FF4,
> Safari, Chrome.
>
>
>
> In the second file, two small differences: a)the file read into the canvas
> is the same SVG as that in the embed, b) an alert is popped up to show the
> src of the image object, once loaded into the browser, but prior to
writing
> into the canvas.
>
>
>
> No browser seems to pass this simple test.
>
>
>
> a) IE loads the SVG into the img, displays it in the canvas, but
> refuses to manipulate the pixel array
>
> b) Safari loads the SVG into the img, displays it in the canvas (but
> without antialiasing), and refuses to manipulate the pixel array
>
> c) Ditto for Chrome
>
> d) Firefox loads the SVG into the img, but doesn't display it or allow
> pixel manipulation.
>
> e) Opera doesn't load the SVG into the img.
>
>
>
> I think I'd rather just add this to the acid test suite than to file five
> separate bug reports. Heck, I'm too lazy for even that. Maybe I'll just
add
> it to my own private set of Cool tests (not having to do with Ken Kesey or
> Ian Hickson). Of course, I suppose it is possible that the spec
> specifically
> allows browsers to give up at different points along this progression,
> since
> it is probably clear that I am up to no good!
>
>
>
> Cheers
>
> David
>
>
>
>

[Non-text portions of this message have been removed]





[Non-text portions of this message have been removed]



------------------------------------

-----
To unsubscribe send a message to: [email protected]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
----Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/svg-developers/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply via email to