Giter VIP home page Giter VIP logo

Comments (11)

keesey avatar keesey commented on June 10, 2024 1

No, this was submitted before automatic vectorization was added. It's the SVG file as submitted. And stuff like this can still happen on new submissions, if submitted as SVG. I have not thought up a good solution to this, but I would love to "sanitize" submitted vector images, similar what's done with the raster images.

from phylopic.

keesey avatar keesey commented on June 10, 2024 1

Another idea would be to offer a "sanitized" version and the original, separately, That might be better. Wouldn't need a change to the API, since sourceFile and vectorFile are already available. (Currently they indicate the same file, if uploaded as an SVG.)

from phylopic.

keesey avatar keesey commented on June 10, 2024 1

Opened a PR for this: #28

(It actually should be working in production already, but this PR is needed to keep it working going forward, as well as to make some UI and verbiage adjustments.)

from phylopic.

keesey avatar keesey commented on June 10, 2024

Ideally the sanitization would be done in the web browser as part of the Contribute Tool, so unfortunately ImageMagick/Inkscape/etc. are not ideal solutions. One idea would be to render the submitted SVG very large and then "revectorize" it (with potrace), but that would remove grey areas (which are sometimes desirable) and possibly key details.

from phylopic.

willgearty avatar willgearty commented on June 10, 2024

I like the idea of a separate "sanitized" version

from phylopic.

keesey avatar keesey commented on June 10, 2024

Yeah, that seems like the best option. The real question is, what's the best way to "sanitize"? Or maybe "normalize" is a better term? The "revectorization" idea is the best I've got, but I don't love it.

from phylopic.

keesey avatar keesey commented on June 10, 2024

Maybe I'm okay with it....
Can always change it to something else later.

from phylopic.

willgearty avatar willgearty commented on June 10, 2024

Another example of a bad SVG: https://www.phylopic.org/images/3d8acaf6-4355-491e-8e86-4a411b53b98b/sus-scrofa
It's actually just a png with an SVG clip path on top.

from phylopic.

keesey avatar keesey commented on June 10, 2024

Thanks, I'll fix that one manually in the next build.

from phylopic.

willgearty avatar willgearty commented on June 10, 2024

Thanks!

from phylopic.

willgearty avatar willgearty commented on June 10, 2024

Excellent!

from phylopic.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.