Chart Macro doesn't render in JPG

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Low
    • None
    • Affects Version/s: 7.0.2, 7.0.3, 7.6.1, 7.12.2
    • Component/s: Macros - Chart
    • None
    • 11
    • Severity 3 - Minor
    • 1

      Issue Summary

      Selecting jpg for image format in "Chart Macro" properties results an error, the macro cannot be rendered and shows the following error instead:

      Error rendering macro 'chart' - javax.imageio.IIOException: Invalid argument to native writeImage"
      

      Steps to Reproduce

      1. Create or edit a page
      2. Insert Chart Macro
      3. Edit properties > select JPG under "Image format"
      4. Shows error "Error rendering macro 'chart' - javax.imageio.IIOException: Invalid argument to native writeImage"

      Expected Results

      Chart Macro should render properly when selecting JPG under image format

      Actual Results

      Chart Macro is not rendered and instead shows an error when JPG is selected for image format under properties

      "Error rendering macro 'chart' - javax.imageio.IIOException: Invalid argument to native writeImage"
      

      Additional Notes

      In some later recent versions of Confluence like (7.6.1), a 0 byte JPG image is rendered and we will see a broken image like follows.

      Analysing HAR file shows that PNG is rendered properly, but JPG results in a 0 byte image.

      PNG
              "request": {
                "method": "GET",
                "url": "http://localhost:8090/download/temp/chart5847754948494120556.png",
                "httpVersion": "HTTP/1.1",
                .
            "response": {
                "status": 200,
                .
              "content": {
                  "size": 7464,
                  "mimeType": "application/x-download",
                  "compression": -1,
                  "text": "iVBORw..." 
                 "encoding": "base64"
      
      JPG
              "request": {
                "method": "GET",
                "url": "http://localhost:8090/download/temp/chart8151348835492516659.jpg",
                "httpVersion": "HTTP/1.1",
                .
            "response": {
                "status": 200,
                .
              "content": {
                  "size": 0,
                  "mimeType": "application/x-download",
                  "compression": -1,
                  "text": "",
                  "encoding": "base64"
      

      Workaround

      Select PNG in image format instead of jpg under Chart Macro properties

        1. chart_macro_jpg_error.png
          139 kB
          Mohamed K
        2. chart-1.png
          178 kB
          Hassan Aftab

            Assignee:
            Unassigned
            Reporter:
            Mohamed K (Inactive)
            Votes:
            10 Vote for this issue
            Watchers:
            16 Start watching this issue

              Created:
              Updated: