Changing the resolution of SVG previews in the Image Map Editor

davidprice
Posts: 8
Joined: Tue Nov 12, 2013 9:56 am

Changing the resolution of SVG previews in the Image Map Editor

Post by davidprice » Mon Jul 19, 2021 8:35 am

Hi y'all,

Is there a way to increase the resolution of the preview image used in the image map editor when the imagemap references an SVG? I have a client that potentially wants to use the Image Map Editor to add callouts to large SVG images, but the raster preview that the image map editor uses is quite low resolution and I'm concerned that it will make placing small callouts accurately very difficult.

If Oxygen XML Editor is using Batik under the covers to render the SVG, is there a parameter that we could modify or customize to change the preview image resolution? Doing so in a way that affects the main editor window as well would be fine. This client already has a custom framework and plugin. They are also currently locked to v20.1 due to a third-party dependency.

Thanks in advance!

Radu
Posts: 7697
Joined: Fri Jul 09, 2004 5:18 pm

Re: Changing the resolution of SVG previews in the Image Map Editor

Post by Radu » Mon Jul 19, 2021 12:49 pm

Hi David,

There should be a zoom slider in the top right part of the image editor dialog:
https://www.oxygenxml.com/doc/versions/ ... ita-2.html

About the customer having Oxygen 20.1, officially 20.1 is in our end of life stage, meaning that officially we no longer support it at all:
https://www.oxygenxml.com/eol.html

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

davidprice
Posts: 8
Joined: Tue Nov 12, 2013 9:56 am

Re: Changing the resolution of SVG previews in the Image Map Editor

Post by davidprice » Mon Jul 19, 2021 9:29 pm

Hi Radu,

Thanks for the response. Believe me, I'd love to get our customer off 20.1 and on something newer, but as far as we're aware SDL does not support any version newer than that for their authoring bridge on Tridion Docs v13.x.

Unfortunately the zoom slider does not affect the resolution of the image, and the resolution is too low to make out details. For example:

With a large, detailed SVG that looks like this when viewed as a vector graphic:
Image

is displayed in the Image Map Editor at 200%, it looks like this:
Image

Is there a way to increase the resolution of the displayed image (via a preference, customization, internal Batik setting, etc) so that a highly-detailed SVG is more usable in the image map editor?

Thanks,
David

davidprice
Posts: 8
Joined: Tue Nov 12, 2013 9:56 am

Re: Changing the resolution of SVG previews in the Image Map Editor

Post by davidprice » Mon Jul 19, 2021 9:31 pm

Sorry, those images didn't show up; the first image should be:

http://www.coyotelogic.com/oxygenxml/Ca ... ditor5.PNG

The second image should be:
http://www.coyotelogic.com/oxygenxml/Ca ... ditor4.PNG

Radu
Posts: 7697
Joined: Fri Jul 09, 2004 5:18 pm

Re: Changing the resolution of SVG previews in the Image Map Editor

Post by Radu » Tue Jul 20, 2021 9:10 am

Hi David,

Can you email us (support@oxygenxml.com) a sample SVG file for tests? I could try to work with it on my side, maybe add an internal issue to make the scaling work better for svg files, rely on their vectorial nature to scale them without loss of details.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

davidprice
Posts: 8
Joined: Tue Nov 12, 2013 9:56 am

Re: Changing the resolution of SVG previews in the Image Map Editor

Post by davidprice » Thu Jul 22, 2021 2:33 am

Thanks Radu, will do!

I think what would be really perfect for our use case for SVGs would be:
- The imagemap coordinates were tied to the root <svg> coordinate system as specified in @viewBox; this would simplify proper callout placement during rendition.
- The Image Map Editor displayed the SVG as a vector rather than a raster so that there were no zoom resolution issues.

I did some more investigation and it looks like the display image resolution is taken from the @height and @width on <svg>. If you don't have a height and width specified (the implied default value is 'auto'), the default resolution ends up being quite low for a large and detailed graphic - I'm not sure yet if there's a default size, or it's approximating from the viewBox, etc.

Thanks,
David

alex_jitianu
Posts: 873
Joined: Wed Nov 16, 2005 11:11 am

Re: Changing the resolution of SVG previews in the Image Map Editor

Post by alex_jitianu » Mon Jul 26, 2021 10:10 am

Hi David,

I've added an issue to proper scale SVG images both in the Author mode and the Image Map. The @viewBox, wich is used for scaling, is already handled by Batik, as far as I see it, just as a browser does it. The difference is in how we handle an image without a @width and @height attributes: we go with a 400px/400px size while the browser gives it the entire viewport width.

For SVG images without a inner size, one could set size attributes on the DITA <image> element. Unfortunately, in this case the scaling is not vectorial in the Author mode, but, like I've said, I've added an issue to fix that.

Best regards,
Alex

davidprice
Posts: 8
Joined: Tue Nov 12, 2013 9:56 am

Re: Changing the resolution of SVG previews in the Image Map Editor

Post by davidprice » Sat Aug 14, 2021 2:20 am

Thanks Alex, much appreciated!

adrian_sorop
Posts: 30
Joined: Wed Jun 22, 2016 2:48 pm

Re: Changing the resolution of SVG previews in the Image Map Editor

Post by adrian_sorop » Mon Oct 18, 2021 3:58 pm

Hi David,

I'm glad to announce that version 24.0 of the Oxygen XML Editor is now available to be downloaded.
In this new release, SVG images scaling in Image Map Editor (and Auhtor page) has been improved.

Regards,
Adrian S.
Adrian Sorop
<oXygen/> XML Editor
http://www.oxygenxml.com

Post Reply