Re: SVG to PNG
Bob Friesenhahn <[email protected]> Fri, 13 Nov 2020 11:01:10 -0600 (CST)
| Newsgroups | gmane.comp.video.graphicsmagick.help |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 13 Nov 2020, Pro Turm wrote: > PS Am I missing something: the mime type of svg+xml > > STATICM doesnt use the mime type svg+xml, but only svg and so > BlobToImage->GetMagickInfo->OpenModule->register_fn > is never called > > A bug or what did I miss _? These are "magick" strings which identify the file format internally. They are not MIME types. The "magick" string is determined in several ways, such as inspecting the file header for clues, the file extension, or using prefix such as "SVG:filename". For example, 'gm convert file.svg file.gif' or 'gm convert svg:file file.gif' If one has a blob of data which can't be automatically identified (normally SVG can be automatically identified), then the 'magick' member of ImageInfo can be updated with a string similar to "SVG". Likewise, if you know that the file is SVG but it somehow can not be determined, then ImageInfo's 'filename' property can be specified like "SVG:filename". In magick/magick.c you will find the MagickToMime() function which goes the other way and converts from a magick string to a MIME string. For example "svg" is equivalent to "image/svg+xml". Bob -- Bob Friesenhahn [email protected], http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/ Public Key, http://www.simplesystems.org/users/bfriesen/public-key.txt