Converting canvas to image url problem in IE9

173 views
Skip to first unread message

Ulas

unread,
May 31, 2012, 4:16:22 PM5/31/12
to google-we...@googlegroups.com
Hi,

I'm currently working on a software in GWT that loads an image into a Canvas object and performs a number or transformations on it. Finally a image url is extracted from the Canvas object using the Canvas.toDataUrl(String) function. 

Now to the issue: the above described works fine in all browsers except IE (it's IE9 but I have tried setting the browser to different compatibility modes, all with the same result). In all other browsers the toDataUrl() function returns a string that looks like:

data:image/png;base64,...

but in IE it only returns:

data: 
 
and nothing else. Has anyone experienced this issue before. What is it due to?


/Ulas

Chris Price

unread,
Jun 1, 2012, 4:19:12 AM6/1/12
to google-we...@googlegroups.com
This is wild speculation but, it could be a X-domain security issue
[1]? If it's only happening in IE, I'd check to see that the loading
of the image is using the same technique in IE as it is in Chrome, FF,
etc. e.g. sprite versus data-url.

[1] http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#security-with-canvas-elements
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-web-toolkit/-/AXLJ_mdkbq4J.
> To post to this group, send email to google-we...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-tool...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
Reply all
Reply to author
Forward
0 new messages