1

I'm specifically interested in gradients but I suppose the question applies to images rendered with any method, such as data:image/svg+xml;...

Is it possible?

ETA:

This was possible by rendering the gradient onto a canvas. For anyone interested in saving a .png of a CSS3 linear or radial gradient, go to:

http://www.visualcsstools.com/gradient-generator.htm

Design your gradient, click the CVS (canvas) button and right-click the gradient preview to save it as an image.

Jules
  • 4,319
  • 3
  • 44
  • 72
  • 1
    Some type of situation and an example of what you're really trying to do will limit the broad answers your bound to get. Try to be more specific! – Shaz Jun 08 '12 at 16:54
  • If you go to http://www.visualcsstools.com/, you'll see a web app that generates radial and linear gradients for any parameters, not just simple up/down, left/right linear gradients. I was looking for a fall back where CSS and SVG is not an option. – Jules Jun 08 '12 at 17:10

2 Answers2

1

A DOM element with a CSS gradient background, no way to do that without a screen shot utility.

However, if you drew a gradient in a canvas element (and any other graphics in the canvas element), you could export the graphic of the canvas element as a JPG or PNG using JavaScript in the browser. See this question.

Community
  • 1
  • 1
Michael Butler
  • 6,079
  • 3
  • 38
  • 46
  • It looks like the way to go. I've managed to do CSS Linear to Canvas Linear (pretty much the same as CSS to SVG), now hopefully radial is just as easy! – Jules Jun 08 '12 at 19:24
-3

By taking a screenshot perhaps?

HBP
  • 15,685
  • 6
  • 28
  • 34