W3C home > Mailing lists > Public > www-svg@w3.org > March 2013

Re: SVGSVGElement.toDataURL()

From: Klaus Förster <klaus.foerster@uibk.ac.at>
Date: Mon, 11 Mar 2013 14:38:31 +0100
Message-ID: <513DDE57.8080401@uibk.ac.at>
To: Robert Longson <longsonr@gmail.com>
CC: www-svg@w3.org
Hi Robert,

On 03/11/2013 01:51 PM, Robert Longson wrote:
> Canvas drawImage will take an SVG image as input and you can convert
> that using toDataURL so it's not really missing is it? You just have
> to go through canvas to do it and that's only three lines of code or
> so.
does Canvas drawImage() allow SVGSVGElements to be used? Reading section 
" The 2D rendering context" [1] it seems it does not as only 
HTMLImageElement, HTMLVideoElement, HTMLCanvasElement, 
CanvasRenderingContext2D or ImageBitmap are listed as valid 

I know that FF allows to pass SVG images to Canvas drawImage() but as 
long as this is not explicitly stated by the spec it is not possible to 
use it cross-browser in a safe way.


> Best regards
> Robert.

Klaus Förster
Department of Geography
University of Innsbruck
A-6020 Innsbruck, Innrain 52
Received on Monday, 11 March 2013 13:39:06 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:41 UTC