Re: SVG to PNG
Pro Turm <[email protected]> Fri, 13 Nov 2020 15:40:56 +0100
| Newsgroups | gmane.comp.video.graphicsmagick.help |
|---|---|
| Message-ID | <CADC9rU91fXOPohjR+8O99Rw4A6MUAqazaM2X6C6UuZcJPzKnSg@mail.gmail.com> |
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 _? Am Fr., 13. Nov. 2020 um 11:50 Uhr schrieb Pro Turm <[email protected]>: > HasXML > > >> 1) Are there any specific APIs concerning SVG? I couldnt grub any > specific > >> documentation page concerning svg. > > > >There are no specific APIs. SVG is just an input file format. > > The documentation (http://www.graphicsmagick.org/formats.html) says "*Requires > libxml2 <http://xmlsoft.org/> and freetype2 <http://www.freetype.org/>*". > In svg.c there is the #if defined(HasXML) > which points to # include <libxml/...h>, which is suppose to to be the > libxml2-dev ? What is the purpose of the folder *libxml* in GM ? Is it > supposed to be used in this context? > > Regards, > > Am Do., 12. Nov. 2020 um 15:19 Uhr schrieb Bob Friesenhahn < > [email protected]>: > >> On Thu, 12 Nov 2020, Pro Turm wrote: >> >> > Thanks. Two questions more: >> > 1) Are there any specific APIs concerning SVG? I couldnt grub any >> specific >> > documentation page concerning svg. >> >> There are no specific APIs. SVG is just an input file format. >> >> > 2) What is the way to reject the dangerous parts of the svgs or they are >> > just ignored by GM ? >> >> Attempts to read local files are already rejected. The FTP and HTTP >> support is marked at an "UNSTABLE" level of coder stability so setting >> the environment variable MAGICK_CODER_STABILITY to STABLE will block >> this support. >> >> If you are writing a C/C++ program which uses the GraphicsMagick >> library, then it is good to know that the header file >> magick/confirm_access.h provides a way for the program to register a >> callback function which will be called to allow the program to "bless" >> or "reject" each file, URL, or program execution access. This >> provides total control and is also a useful way to observe what is >> going on. The relevent API definitions are: >> >> typedef enum >> { >> UndefinedConfirmAccessMode, >> FileExecuteConfirmAccessMode, /* Path is to be opened for >> execution */ >> FileReadConfirmAccessMode, /* Path is to be opened for read */ >> FileWriteConfirmAccessMode, /* Path is to be opened for write */ >> URLGetFTPConfirmAccessMode, /* ftp:// URL get */ >> URLGetFileConfirmAccessMode, /* file:// URL get */ >> URLGetHTTPConfirmAccessMode /* http:// URL get */ >> } ConfirmAccessMode; >> >> typedef MagickPassFail >> (*ConfirmAccessHandler)(const ConfirmAccessMode mode, >> const char *path, >> ExceptionInfo *exception); >> >> extern MagickExport ConfirmAccessHandler >> MagickSetConfirmAccessHandler(ConfirmAccessHandler handler); >> >> In addition to the above, resource limits may be set to limit resource >> consumption such as the size of a generated image, or the amount of >> allocated memory. >> >> 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 >> >> >> _______________________________________________ >> Graphicsmagick-help mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/graphicsmagick-help >> > _______________________________________________ Graphicsmagick-help mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/graphicsmagick-help