makeImageData: svg elements missing on large diagrams


I have a large diagram where each node has an svg icon. Total diagram size is about 18000x10000.
When creating an png with makeImageData (max size is set to diagram size), a png with the correct dimensions is created, but the svg node icons east of ~16000 pixels are not printed. On the other hand, links are drawn correctly, even east of 16000px. If I move some icons from east to west of 16000px, they are displayed correctly in the png. I am using Electron.

In order to be able to set an appropriate maximum size for the image to be generated, I need to understand what is the cause for the missing icons.

As the png has been created correctly, it doesn’t seem to be a memory issue.
There is a limit to the canvas size, but the whole canvas is displayed, so this also seems to be unrelated.

Could you give me a hint what could be causes these missing icons?

Edit: Sorry, I didn’t read you correctly. We’ll investigate this.

Here is an example of what I mean:

Works in Firefox. However in Chrome the last few nodes do not display an icon.

Seems to be related to the numbers mentioned here, for Chrome this is mentioned:

Maximum height/width: 32,767 pixels
Maximum area: 268,435,456 pixels (e.g., 16,384 x 16,384)

However the dimension of the example is both within the maximum height/width and the area, so I don’t understand what’s happening.

This is probably a browser bug that we have no control over, however you could make multiple images of the diagram like we do in the printing intro page, and concat them yourself somehow.

Okay thanks. Checking the different browsers it seems okay to assume 16,384 as the maximum width/height for the image.

Do you also need to consider mobile devices, especially smartphones? That’s why the default maximum image size for Diagram.makeImageData is 2000x2000.

Are you referring to the 4,096 x 4,096 limit on Windows Phone 8 and Safari or to the memory demand for creating the image?
We need to consider mobile devices, mainly tablets. I will make sure to test this on all platforms we support and adjust the maximum if necessary. Thanks for pointing this out!

I was referring to the overall memory usage. JavaScript is bad enough by itself.