Capella freezes on copy image to byte array

Hi all,

I try to work with Capella element (diagram) as byte array in java.
For this case I use CopyToImageUtil from eclipse.
org.eclipse.gmf.runtime.diagram.ui.render.util.CopyToImageUtil

Example of code:
Diagram diagram = (Diagram) element;
byte[] pngDiagram = copyToImageUtil.copyToImageByteArray(diagram, 800, 800, ImageFileFormat.PNG, new NullProgressMonitor(), PreferencesHint.USE_DEFAULTS, true);

On big diagram copyToImageUtil.copyToImageByteArray freezes and Capella does not response.

Is it a right way to get byte array of the diagram?
Is anyone faced with such problem?


Thank you,
Egor

Copyright © Eclipse Capella, the Eclipse Capella logo, Eclipse and the Eclipse logo are Trademarks of The Eclipse Foundation.