- return new Point(0, 0);
- Point intrinsicSize;
- if (fileNode.hasProperty(EntityNames.SVG_WIDTH) && fileNode.hasProperty(EntityNames.SVG_HEIGHT)) {
- int width = (int) fileNode.getProperty(EntityNames.SVG_WIDTH).getLong();
- int height = (int) fileNode.getProperty(EntityNames.SVG_HEIGHT).getLong();
- intrinsicSize = new Point(width, height);
- } else {
- try (InputStream in = JcrUtils.getFileAsStream(fileNode)) {
- ImageData id = new ImageData(in);
- intrinsicSize = updateSize(fileNode, id);
- } catch (IOException e) {
- throw new RuntimeException("Cannot load file " + fileNode, e);
+ return new Cms2DSize(0, 0);
+ try {
+ Cms2DSize intrinsicSize;
+ if (fileNode.hasProperty(EntityNames.SVG_WIDTH) && fileNode.hasProperty(EntityNames.SVG_HEIGHT)) {
+ int width = (int) fileNode.getProperty(EntityNames.SVG_WIDTH).getLong();
+ int height = (int) fileNode.getProperty(EntityNames.SVG_HEIGHT).getLong();
+ intrinsicSize = new Cms2DSize(width, height);
+ } else {
+ try (InputStream in = JcrUtils.getFileAsStream(fileNode)) {
+ ImageData id = new ImageData(in);
+ intrinsicSize = updateSize(fileNode, id);
+ } catch (IOException e) {
+ throw new RuntimeException("Cannot load file " + fileNode, e);
+ }