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

Transcoder Tutorial error for KEY_WIDTH

    XMLWordPrintableJSON

Details

    Description

      The Transcoder tutorial on the batik web site give the following code snippet
      for resizing the output:
      t.addTranscodingHint(JPEGTranscoder.KEY_WIDTH, new Integer(100));

      The KEY_WIDTH is actually on SVGAbstractTranscoder (some IDEs give a warning)
      but in my tests this is refused at runtime with an IllegalArgumentException: the
      javadoc states KEY_WIDTH is a Float:

      t.addTranscodingHint(SVGAbstractTranscoder.KEY_WIDTH, new Float(100));

      is the correct snippet

      Attachments

        Activity

          People

            batik-dev@xmlgraphics.apache.org Batik Developer's Mailing list
            jpmoresmau@hotmail.com JP Moresmau
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: