Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support svg #21

Open
guylando opened this issue Jul 8, 2018 · 1 comment
Open

Support svg #21

guylando opened this issue Jul 8, 2018 · 1 comment

Comments

@guylando
Copy link

guylando commented Jul 8, 2018

can you please add support to sniff svg? thats the only thing missing to use this package for image content format sniffing.

@RobertoMachorro
Copy link

A few things need to be pointed out here; this library is binary file focused and SVG is an XML text file and may be subject to variations. For example, the XML and doctype heading presence and content will vary, since Mime-Type expects a specific byte block match at a specific location, it may fail to recognize SVG sometimes.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 1200 1200" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;">

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants