I would like to be able to use SVG for image editing but be able to generate a bitmap image if appropriate (GIF, PNG, JPG, etc). Any chance of a very simple API for vector to raster conversion? API would require a) output filename/directory b) output image format (PNG, JPG, GIF, etc) c) image size in pixels (200x300) d) color depth in pixels (8/16/24/etc) Or is there a way of doing this already?
This is a _Mozilla_ bug?!
Assignee: dean.jackson → mjudge
Component: SVG → Image Conversion Library
QA Contact: dean.jackson → tpreston
Severity: normal → enhancement
Summary: RFE vector to raster conversion (SVG) → [RFE] vector to raster conversion (SVG)
Heh. Certainly not - this Bugzilla only handles bugs and feature requests for Mozilla. SVG is a standard and product of Adobe if I recall correctly. Marking INVALID.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → INVALID
We are not Adobe Photoshop. We do have some sort of cvs tree for SVG stuff, quite what the state/purpose of it is I do not know. However saving from SVG to raster formats is not the job of a web browser. Use the right tool for the right job :). Unless, of course, we've all gotten the wrong end of the stick with your bug report... Verified Invalid.
Status: RESOLVED → VERIFIED
I'm surprised by some of the follow up comments - particularly that the idea that Mozilla is just a browser. I doubt if most of the XPFE group see it in those terms. Chatzilla, Composer, etc all provide editing functionality. I believe someone has already built a editor based around SVG. What is required a VERY BASIC method of dumping a bitmap representation of the screen (just as you could/can with VB - the Printform method if I remember correctly). We are not talking Photoshop here!!!! If on the otherhand you are saying that SVG is no longer Mozilla's choice of vector drawing tool - then what is??
PS I have temporarily reopened this RFE as I suspect once marked as INVALID, follow up comments/queries dont get seen/responded to. !
Status: VERIFIED → UNCONFIRMED
Resolution: INVALID → ---
Marking new to aid discussion.
Status: UNCONFIRMED → NEW
Ever confirmed: true
PS It may be that SVG is not the main issue here (functionality wise) but a general need for a window handle that allows a selected bit of the window area to be saved (like Printform). I will attempt to explore use of scripted cut and paste , together with save as file (GIF, PNG, etc) functions
moving to future
Priority: -- → P5
Target Milestone: --- → Future
back to SVG component
Component: Image Conversion Library → SVG
Come on, this *is* INVALID, right?
PS ..... or could the printing component be used to achieve this. ie. Print the contents of an iframe to a file ( in gif or png) format ? Does the print component have the ability to save in a particluar graphics format?
A more appropriate title might be "Capturing iframe content as raster" As Ive said before Im quite happy have this RFE closed but before it is can anyone clarify which Mozilla APIs allow the contents of Mozilla iframes (htm, svg, xml, etc) to captured and saved.? Can (or is) the print component the most likely component that would provide a method of saving iframe content in raster format (e.g. PNG)? If not, can anyone suggest which component category this RFE should be filed.?
Theres a debug-only api which saves to a ppm. Its useful for debugging purposes, so this is possible, in theory. Batik allows you to do this.
What about implementing this via the printing API ?
FYI I filed a request for such an enhancement to the printer API to allow this which I believe you triaged. Bug 113231. Since bug 113231 now appears to have been adopted (it has assigned status) this enhancement request (64074) can be closed. I only left it open for some feedback.
The now defunct Eazel wrote a library for rasterising SVG as part of Nautilus librsvg. quite a few open source projects use it. It is licensed under the LGPL. it is in Gnome CVS http://cvs.gnome.org/lxr/source/librsvg/ Google produces quite a few links, but Librsvg does not seem to have a homepage of its own or anything like that. http://www.google.com/search?q=librsvg&sourceid=mozilla-search&start=0&start=0
Summary: [RFE] vector to raster conversion (SVG) → vector to raster conversion (SVG)
I can see this being useful, but SVG is most certainly not the right component to implement this functionality in. You'd want to be able to do this for any xml content, so the best way to attack this would probably be on the nsRenderingContext level. GFX seems a more appropriate component -> reassigning.
Assignee: mjudge → general
Component: SVG → GFX
QA Contact: tpreston → ian
If you're JS in chrome, you can just load the SVG into an iframe, use drawWindow on a canvas, and then use toDataURI to get out a PNG. Is there anything else needed here?
Yeah, Canvas seems to provide the desired functionality to the extent that it can without security issues.
Status: NEW → RESOLVED
Last Resolved: 18 years ago → 6 years ago
Resolution: --- → FIXED
(In reply to Eli Friedman from comment #19) > If you're JS in chrome, you can just load the SVG into an iframe, use > drawWindow on a canvas, and then use toDataURI to get out a PNG. Is there > anything else needed here? A way to convert SMIL animation to animated PNG.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
IE10 allows a user to "Save Picture as…" on an SVG document and save it as a PNG or BMP.
You need to log in before you can comment on or make changes to this bug.