0

I am trying to make an SVG file with different togglable embeded raster images (quite easy), but also able to export the final composite image.

For example, the file could contain the background, a house and a tree.

If I click on the tree, its opacity would be set to 0.

I could then click a render button, and I would be able to save an image made from the background and the house.

I don't know if I should try to edit the base64 bitmaps, or use a native feature of the SVG language.

  • 2
    Should the render button save an svg or a raster image? – Tamas Hegedus Dec 25 '15 at 03:56
  • raster image. Saving an SVG would just be text editing basically, editing an image without a canvas is harder. – Louis Garczynski Dec 26 '15 at 01:06
  • I guess that the use of [ecmascript-5] and [javascript] tags means that you are displaying these svgs in web browsers. Why don't you just use a [canvas to render your svg](http://stackoverflow.com/questions/34042910/convert-svg-to-png-with-applied-images-as-background-to-svg-elements/34043188#34043188) as bitmaps ? – Kaiido Dec 26 '15 at 13:55
  • Because it is supposed to be a sharable and savable "app" that works on any computer and can be saved and used seperatly. – Louis Garczynski Dec 28 '15 at 00:46
  • Then how can you even be sure that ecmascript will be supported? Ps: there is no built-in export to raster method in svg markup. – Kaiido Dec 28 '15 at 04:24
  • Sorry I meant firefox and chrome, and beside, ecmascipt is just a possible scrip, javascript is just as possible. Any chance of making the canvas work inside svg? – Louis Garczynski Dec 28 '15 at 13:07

0 Answers0