Uploaded image for project: 'Batik'
  1. Batik
  2. BATIK-1285

[PATCH] Batik fails to parse an svg with missing 'offset' attribute

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Blocker
    • Resolution: Unresolved
    • 1.12
    • None
    • None
    • None

    Description

      Many modern design tools like Figma and others do not put offset attribute when generating a svg image if offset equals 0. See https://www.w3.org/TR/SVG/pservers.html#GradientStopAttributes

      Batik fails with exception while trying to read such svgs. Other programs successfully open these files.
      The pull request sets offset to 0 when the attribute is missing.

      Please find a pull request and image example here: https://github.com/apache/xmlgraphics-batik/pull/20 

      IntelliJ Platform and all IDEs based on it use Batik (10M+ users). IDE fails when icon with the missing offset attribute is used.

      Could you verify and apply the patch, please.

      Attachments

        1. exception.txt
          2 kB
          Konstantin Bulenkov
        2. Batik1285Bug.java
          1 kB
          Konstantin Bulenkov

        Activity

          People

            Unassigned Unassigned
            bulenkov Konstantin Bulenkov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: