Jump to content

Recommended Posts

Posted

I am creating designs in Affinity design and then need to export to a digitizing software.  It only takes SVG files which is fine and I export the Affinity file as an SVG file but when I open it in the digitizing software it has reduced the size of the image significantly.  As an example from a 6"x6" size image to a .1" x .1" size image. Any reason for this?  I am able to resize it to the correct size in the digitizing software but obviously it would be easier to have it come in at the right size. BTW I have created the image in other draw programs, exported as SVG and opened in the digitizing software and it comes up as the original size created.  It only seems to reduce the size when I use Affinity.

Thanks for any help

Posted
38 minutes ago, ASG said:

I am creating designs in Affinity design and then need to export to a digitizing software.  It only takes SVG files which is fine and I export the Affinity file as an SVG file but when I open it in the digitizing software it has reduced the size of the image significantly.  As an example from a 6"x6" size image to a .1" x .1" size image. Any reason for this?  I am able to resize it to the correct size in the digitizing software but obviously it would be easier to have it come in at the right size. BTW I have created the image in other draw programs, exported as SVG and opened in the digitizing software and it comes up as the original size created.  It only seems to reduce the size when I use Affinity.

Thanks for any help

Hi ASG!

When you export, fill 96 DPI into the box "Use DPI" (under "More").

Posted

Thanks for the reply.  I did go back and read all the others on this topic.   Didn't find them when I searched earlier.  In any case,  I tried another test.  I made an image at 4" x 4.75".   Transferring it at 96 gave me one 4.27"  x  5.07" .   Tried same image at 72 and I got 3.2"  x  3.8".  If i extrapolate those correctly seems like I should be using 90.  But it won't let me put in a manual DPI.  Well, it lets me put it in but seems to revert back to 96 (since it's closer I assume) and saves it again at that size.

Thoughts???

Posted

Guess I have to live with it.  I can enter 90 into the export but when I save it, it just saves it exactly the same as 96 (same measurements) It didn't change anything.  

Thanks for the help anyway and I will work with it as is and adjust in the other program.  Hopefully at some point they will fix this.

Posted

Hm, mysterious. I'm on Windows 10 with Designer 1.10.0.1127. And you?

To be honest, this topic confuses me a little. I never had to do with the DPI-values related to SVGs before. I just tested it out for this thread and saw that 96 DPI seemed to work.  I would normally say that it doesn't even make sense, because svg, as the name says (Scalable Vector Graphic) isn't based on pixels, but on vector data and can be scaled without any loss of quality - in opposite to pixel images that become unsharp or pixelated if you scale it. So the DPI shouldn't matter.

Possibly the core of this problem is related to your digitizing software. Have you already taken a look into its Preferences? Perhaps there is an option that defines this so called "relative resolution" (DPI or better PPI - "Pixel per Inch"). Or just scale your graphic in that software if possible. It should not lower the quality.

If I f.e. export a graphic with a size of 100x100 mm from Designer as svg with 90 DPI and try to open it in GIMP, GIMP offers me 90 DPI as relative resolution (as it ever does) and opens it with nearly the right measurements: 100,19x100,19 mm. The small difference results from the fact, that GIMP can't open SVGs without rasterizing. Pixels can't be cutted and 90 Pixels per Inch don't fit exactly to 100 mm.

If I export the same graphic with 300 DPI from Designer and open it in GIMP with a resolution of 300 DPI, the dimensions are 100,08x100,08 mm. So nearly the same size. So you see that the DPI-value doesn't really matter, except for the transfer. So there may be possibly an option in your digitizing software to define the right resolution for the transfer. And that should be the same as you used for the export.

Posted
1 hour ago, iconoclast said:

I would normally say that it doesn't even make sense, because svg, as the name says (Scalable Vector Graphic) isn't based on pixels ...

Not that it should matter but SVG files can include bitmap images as well as vectors.

All 3 1.10.8, & all 3 V2.6 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
A
ll 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Posted
5 hours ago, R C-R said:

Not that it should matter but SVG files can include bitmap images as well as vectors.

Yes, of course that matters. In that case the SVGs are no longer scalable without losses in quality. Everybody who uses pixel images in SVGs should know that. But I don't think that this is the main topic here. The most important thing this thread is about is that you have to import the SVG with the same resolution you exported it with.

Posted

The problem is that unless you export at 96 PPI, AD is unable to give accurate mesures.

I tested with different apps and created an A5 page, with randomly positioned, a square of 50×50 mm and a circle of diameter 30 mm (60×60 mm):

  • Inkscape will only give sizes in mm for page and objects: ok
  • Draw (LibreOffice) will give size in mm for page and objects in pixels, same for the viewbox: ok
  • Vectr will use pixel sizes: ok
  • Gravit only give point sizes: ok
  • Photopea only give pixel sizes: bad
  • AD, export with 300 ppi, only give pixel sizes: bad (similar size than Photopea)
  • AD, export with 96 ppi, only give pixel sizes: ok  

I checked the files opening them in InkScape, setting unit to mm, and checking size.

Files:

testUntitled6ink.svg (inkscape)

AD_Untitled8bis_96ppi.svg 

AD_Untitled8_300ppi.svg 

Vectr_untitled.svg 

testDraw.svg 

testPhotopea.svg 

testGravit.svg 

Posted

I only checked it with Inkscape and GIMP. If I exported a document with the dimensions 100 mm x 100 mm with a certain resolution (DPI) and opened it with the same resolution in Inkscape, it had exactly the same dimensions (100 x 100 mm).

If I did the same and opened the SVG in GIMP with the same resolution I got minimal different dimensions. That makes sense, because, as I already said, in GIMP the SVG will be opened rasterized. So it will no longer be a vector graphic, but a pixel image. And pixels can't be cutted. So, to get exactly the same dimensions, you would need a resolution that creates a pixel image with the exact count of pixels that fit to the dimensions in mm.

So, for me it seems that the inaccuracy results form the transfer from vectors into pixels. As you can see in my example in my last post, 300 DPI result in a more accurate transfer than 96 DPI, because you have smaller pixels that of course fit better.

Posted

I think size are accurate when they are given in other units that pixels, or if two units are used (for area, and object, i.e. points/mm and pixels). 

And it's logical:

  • if it's a physical dimension (points, mm...), any app can open the document and get the right size, and the resolution can be modified depending of needs, or be different depending of app (inkScape will use 96ppi, AD 72 ppi).
  • if there's a physical dimension and a pixel unit used, it's possible for the app to deduce resolution.
  • if there's only pixel unit, and the app always open with a specific PPI, there's no way it's able to get right size. Worste, in the case of AD for example, it won't be able to open a file it exported at different PPI at the same size.

An interesting part of the specs: https://www.w3.org/TR/SVG11/coords.html#Units

Quote

All coordinates and lengths in SVG can be specified with or without a unit identifier.

When a coordinate or length value is a number without a unit identifier (e.g., "25"), then the given coordinate or length is assumed to be in user units (i.e., a value in the current user coordinate system). For example:


<text font-size="50">Text size is 50 user units</text>

Alternatively, a coordinate or length value can be expressed as a number followed by a unit identifier (e.g., "25cm" or "15em").

It would be usefull when exporting to SVG to be able to specify the height and width units (or use the one of the document: in, mm, pt...), instead of using by default 100%, and having the viewbow set with pixel dimensions, or no viewbox and the document's dimensions set in pixels.

This way, AD and other apps can open the files at the right size (instead of exporting at different resolutions but only importing at the same one, mostly 72 or 96 ppi (inkScape default value)).

For now, AD is able to export at specified PPI (and it results in objects of different pixel sizes), but unable to read it since it always uses 72 PPI when opening files. :S  

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.