# SIF output extension to ship in Inkscape 0.49, needs testing

**URL:** https://forums.synfig.org/t/sif-output-extension-to-ship-in-inkscape-0-49-needs-testing/1526
**Category:** Synfig news discussion
**Created:** [July 31, 2011, 1:04am UTC](https://forums.synfig.org/t/sif-output-extension-to-ship-in-inkscape-0-49-needs-testing/1526 "2011-07-31T01:04:23Z")
**Posts on this page:** 20
**Page:** 3

<div class="post-metadata">

### Author: ![efa](https://forums.synfig.org/letter_avatar_proxy/v4/letter/e/c5a1d2/32.png) [@efa](https://forums.synfig.org/u/efa)
#### Post date: [September 15, 2011, 8:23pm UTC](https://forums.synfig.org/t/sif-output-extension-to-ship-in-inkscape-0-49-needs-testing/1526/41 "2011-09-15T20:23:28Z")

</div>

> [@nikitakit](#):
>
> Good thing that’s solved. I probably should have guessed what was going on, sorry for not being able to catch that.

work on Ubuntu too

> [@nikitakit](#):
>
> I need better documentation on the page to make sure something like this doesn’t happen again. (I’m actually tempted to do “Save Link As” myself every time I go to github).

so this happen also with your browser?

---

<div class="post-metadata">

### Author: ![nikitakit](https://forums.synfig.org/user_avatar/forums.synfig.org/nikitakit/32/3541_2.png) [@nikitakit](https://forums.synfig.org/u/nikitakit)
#### Post date: [September 15, 2011, 8:27pm UTC](https://forums.synfig.org/t/sif-output-extension-to-ship-in-inkscape-0-49-needs-testing/1526/42 "2011-09-15T20:27:37Z")

</div>

> [@efa](#):
>
> > [@nikitakit](#):
> >
> > I need better documentation on the page to make sure something like this doesn’t happen again. (I’m actually tempted to do “Save Link As” myself every time I go to github).
> 
> so this happen also with your browser?

Yes. The browser is doing exactly what you asked it to, namely to save the page being linked to by the text. The problem is that this page isn’t the actual file: it’s a rendering of the file. (In other words, when you click the link you get an HTML document that has the text of the file, with nice Github formatting). It’s not intuitive, but it works as advertised.

---

<div class="post-metadata">

### Author: ![efa](https://forums.synfig.org/letter_avatar_proxy/v4/letter/e/c5a1d2/32.png) [@efa](https://forums.synfig.org/u/efa)
#### Post date: [September 16, 2011, 11:56am UTC](https://forums.synfig.org/t/sif-output-extension-to-ship-in-inkscape-0-49-needs-testing/1526/43 "2011-09-16T11:56:14Z")

</div>

> [@nikitakit](#):
>
> Yes. The browser is doing exactly what you asked it to, namely to save the page being linked to by the text. The problem is that this page isn’t the actual file: it’s a rendering of the file. (In other words, when you click the link you get an HTML document that has the text of the file, with nice Github formatting). It’s not intuitive, but it works as advertised.

not as advertized, the problem maybe not in the linked page, but in the linking page:  
[github.com/nikitakit/svg2sif](https://github.com/nikitakit/svg2sif)

For example the text say “synfig\_fileformat.py” and the link point to:  
“[svg2sif/synfig\_fileformat.py at master · nikitakit/svg2sif · GitHub](https://github.com/nikitakit/svg2sif/blob/master/synfig_fileformat.py)”  
but the document that is linked and sent by http server, is not “synfig\_fileformat.py” like all other web site do.

---

<div class="post-metadata">

### Author: ![nikitakit](https://forums.synfig.org/user_avatar/forums.synfig.org/nikitakit/32/3541_2.png) [@nikitakit](https://forums.synfig.org/u/nikitakit)
#### Post date: [September 16, 2011, 3:36pm UTC](https://forums.synfig.org/t/sif-output-extension-to-ship-in-inkscape-0-49-needs-testing/1526/44 "2011-09-16T15:36:26Z")

</div>

> [@efa](#):
>
> > [@nikitakit](#):
> >
> > Yes. The browser is doing exactly what you asked it to, namely to save the page being linked to by the text. The problem is that this page isn’t the actual file: it’s a rendering of the file. (In other words, when you click the link you get an HTML document that has the text of the file, with nice Github formatting). It’s not intuitive, but it works as advertised.
> 
> not as advertized, the problem maybe not in the linked page, but in the linking page:  
> [github.com/nikitakit/svg2sif](https://github.com/nikitakit/svg2sif)
> 
> For example the text say “synfig\_fileformat.py” and the link point to:  
> “[svg2sif/synfig\_fileformat.py at master · nikitakit/svg2sif · GitHub](https://github.com/nikitakit/svg2sif/blob/master/synfig_fileformat.py)”  
> but the document that is linked and sent by http server, is not “synfig\_fileformat.py” like all other web site do.

When you click on the link normally (without doing “Save”), you get a certain github page - and not raw text. What “Save Link As” does is equivalent to clicking on the link with your mouse, and then pressing Ctrl-S on the next page. I’m guessing the reason the document name ends in synfig\_fileformat.py is so the URL looks clean (other websites would have a lot of PHP stuff in the URL, which makes it very long but at the same time easy to recognize as an HTML page)

---

<div class="post-metadata">

### Author: ![Genete](https://forums.synfig.org/user_avatar/forums.synfig.org/genete/32/8_2.png) [@Genete](https://forums.synfig.org/u/Genete)
#### Post date: [September 16, 2011, 5:17pm UTC](https://forums.synfig.org/t/sif-output-extension-to-ship-in-inkscape-0-49-needs-testing/1526/45 "2011-09-16T17:17:52Z")

</div>

In any case it would be good to update the README file to explain the user to use the Download button to get the sources (tarball or zip) or use the raw link on the right top side to get a plain text of the file:  
[raw.github.com/nikitakit/svg2si … eformat.py](https://raw.github.com/nikitakit/svg2sif/master/synfig_fileformat.py)  
which can be saved from the browser as the original text ASCII file.  
-G

---

<div class="post-metadata">

### Author: ![nikitakit](https://forums.synfig.org/user_avatar/forums.synfig.org/nikitakit/32/3541_2.png) [@nikitakit](https://forums.synfig.org/u/nikitakit)
#### Post date: [September 22, 2011, 11:10pm UTC](https://forums.synfig.org/t/sif-output-extension-to-ship-in-inkscape-0-49-needs-testing/1526/46 "2011-09-22T23:10:08Z")

</div>

A new stable version is tagged. It contains partial support for blurs and blend methods, as well as better error handling. The readme has also been changed to add a “Download” section.

I haven’t been able to identify the relationship between SVG blur sizes (measured in standard deviations) and Synfig blur sizes (measured in unknown units), so the blurs won’t transfer exactly. This problem been giving me a lot of headaches so I’ve decided to set it aside for now and come back to it after a long break.

All that’s left is to run a final set of tests, this time using Inkscape 0.49 trunk, and then I’m going to move on to other projects. (I’ll still be around to fix bugs and do maintenance - but please speak up if you want something implemented)

---

<div class="post-metadata">

### Author: ![tushantin](https://forums.synfig.org/user_avatar/forums.synfig.org/tushantin/32/43_2.png) [@tushantin](https://forums.synfig.org/u/tushantin)
#### Post date: [September 23, 2011, 11:02pm UTC](https://forums.synfig.org/t/sif-output-extension-to-ship-in-inkscape-0-49-needs-testing/1526/47 "2011-09-23T23:02:36Z")

</div>

Nikitat, would you like me to advertise this plugin? I’m not sure if I want something implemented (at the moment I’m not in the position to “know” what’s to be implemented), although I wonder if the plugin will be available on Inkscape’s next version by default.

---

<div class="post-metadata">

### Author: ![DaveJ](https://forums.synfig.org/user_avatar/forums.synfig.org/davej/32/93_2.png) [@DaveJ](https://forums.synfig.org/u/DaveJ)
#### Post date: [September 25, 2011, 10:01am UTC](https://forums.synfig.org/t/sif-output-extension-to-ship-in-inkscape-0-49-needs-testing/1526/48 "2011-09-25T10:01:27Z")

</div>

I tried the Inkscape SIF exporter out this morning and it is MUCH better than the built in Synfig Studio SVG importer.

The only thing I notice is that Inkscape graphics (including bitmaps) are always slightly too small into Synfig Studio in pixels compared to their size in Inkscape.

Well done for writing this tool, it is fantastic.

---

<div class="post-metadata">

### Author: ![nikitakit](https://forums.synfig.org/user_avatar/forums.synfig.org/nikitakit/32/3541_2.png) [@nikitakit](https://forums.synfig.org/u/nikitakit)
#### Post date: [September 26, 2011, 12:09am UTC](https://forums.synfig.org/t/sif-output-extension-to-ship-in-inkscape-0-49-needs-testing/1526/49 "2011-09-26T00:09:46Z")

</div>

DaveJ: can you elaborate on that, and maybe post a few examples to demonstrate? If the pixel size is wrong I want to fix it ASAP.

---

<div class="post-metadata">

### Author: ![DaveJ](https://forums.synfig.org/user_avatar/forums.synfig.org/davej/32/93_2.png) [@DaveJ](https://forums.synfig.org/u/DaveJ)
#### Post date: [September 26, 2011, 4:15am UTC](https://forums.synfig.org/t/sif-output-extension-to-ship-in-inkscape-0-49-needs-testing/1526/50 "2011-09-26T04:15:52Z")

</div>

OK, if I’m doing something for PAL video I’ll often do it at 768x576:  
 ![2-768x576.svg](https://forums.synfig.org/uploads/default/original/2X/a/aedcb5ce5dd362e863e74d8bc5837d5dfbbb5612.svg)

If I export this as a .sif then I get the following file:  
[2-768x576.sif](https://forums.synfig.org/uploads/default/original/2X/f/feee34e1b83080ec717c071912a80269ef1c768e.sif) (29.5 KB)

The Canvas is correctly set up in Synfig Studio as 768 x 576. The graphic is correctly positioned in the top left corner with the top left vertex (Vertex 1) placed at 384px, 288px. However the bottom right vertex of the background (Vertex 3) is placed at -230.400020px, -172.8px when it should be at (384, 288).

Therefore my 768 x 576 SVG graphic becomes approx. 614 x 460.8 pixels in Synfig.

I think that reason is that Inkscape SVG files are 90 dpi. Synfig has imported the graphic as 72 dpi.

90/72 = 1.25 and 768/614 = 1.25.

I hope this is helpful. As I said before I think this Inkscape SIF exporter is fantastic.

---

<div class="post-metadata">

### Author: ![nikitakit](https://forums.synfig.org/user_avatar/forums.synfig.org/nikitakit/32/3541_2.png) [@nikitakit](https://forums.synfig.org/u/nikitakit)
#### Post date: [September 26, 2011, 8:11am UTC](https://forums.synfig.org/t/sif-output-extension-to-ship-in-inkscape-0-49-needs-testing/1526/51 "2011-09-26T08:11:11Z")

</div>

Good catch! I’ll work on a fix.

---

<div class="post-metadata">

### Author: ![DaveJ](https://forums.synfig.org/user_avatar/forums.synfig.org/davej/32/93_2.png) [@DaveJ](https://forums.synfig.org/u/DaveJ)
#### Post date: [September 26, 2011, 11:09am UTC](https://forums.synfig.org/t/sif-output-extension-to-ship-in-inkscape-0-49-needs-testing/1526/52 "2011-09-26T11:09:19Z")

</div>

> [@nikitakit](#):
>
> Good catch! I’ll work on a fix.

I used the exporter to do the animations in this:

[youtu.be/\_hKvPMSBSts](http://youtu.be/_hKvPMSBSts)

It worked brilliantly - many thanks.

---

<div class="post-metadata">

### Author: ![nikitakit](https://forums.synfig.org/user_avatar/forums.synfig.org/nikitakit/32/3541_2.png) [@nikitakit](https://forums.synfig.org/u/nikitakit)
#### Post date: [September 26, 2011, 6:36pm UTC](https://forums.synfig.org/t/sif-output-extension-to-ship-in-inkscape-0-49-needs-testing/1526/53 "2011-09-26T18:36:07Z")

</div>

It’s good to know that everything is working for you 😃

I’ve though about the resolution problem a bit and it’s not immediately obvious what the “best” solution should be. In fact, there are several options, each with its pros and cons.

1: Create a Synfig animation with the original pixel size, at 90 dpi. This would exactly match the SVG document, but not Synfig’s default resolution of 72dpi. Now suppose you’re importing SVG clipart into an existing Synfig project - then things might not work as expected.

2: Create a Synfig animation with the original pixel size, at 72 dpi. Given that we’re working with vector graphics, this is a lossless dpi downgrade, and the final 72dpi seems more standard (or at least it is what Synfig uses by default). On the other hand, the physical size will be wrong.

3: Create a Synfig animation with the original physical size, at 72 dpi. But if you’re relying on pixel dimensions the result will be very counterintuitive.

Could everyone here please tell me which of these would work best for their use cases?

---

<div class="post-metadata">

### Author: ![rylleman](https://forums.synfig.org/user_avatar/forums.synfig.org/rylleman/32/35_2.png) [@rylleman](https://forums.synfig.org/u/rylleman)
#### Post date: [September 26, 2011, 7:49pm UTC](https://forums.synfig.org/t/sif-output-extension-to-ship-in-inkscape-0-49-needs-testing/1526/54 "2011-09-26T19:49:44Z")

</div>

> [@nikitakit](#):
>
> …  
> Could everyone here please tell me which of these would work best for their use cases?

I would prefer #2. Since Synfig rarely deals wih physical size but pixels I think this option is least disturbing to the user.

---

<div class="post-metadata">

### Author: ![DaveJ](https://forums.synfig.org/user_avatar/forums.synfig.org/davej/32/93_2.png) [@DaveJ](https://forums.synfig.org/u/DaveJ)
#### Post date: [September 27, 2011, 5:57am UTC](https://forums.synfig.org/t/sif-output-extension-to-ship-in-inkscape-0-49-needs-testing/1526/55 "2011-09-27T05:57:30Z")

</div>

I would also prefer #2, as I agree with rylleman it’s the most naturally “expected” behaviour by the user.

Scribus also has this problem importing Inkscape SVG files by the way - in my view the main fault is with Inkscape as it does not allow you to modify the dpi.

---

<div class="post-metadata">

### Author: ![rylleman](https://forums.synfig.org/user_avatar/forums.synfig.org/rylleman/32/35_2.png) [@rylleman](https://forums.synfig.org/u/rylleman)
#### Post date: [September 27, 2011, 6:31am UTC](https://forums.synfig.org/t/sif-output-extension-to-ship-in-inkscape-0-49-needs-testing/1526/56 "2011-09-27T06:31:31Z")

</div>

Dpi shouldn’t matter when working digital for a digital output, we deal with pixel sizes and this should stay the same in all conversions. Dpi is only relevant when the target is print on paper.

---

<div class="post-metadata">

### Author: ![nikitakit](https://forums.synfig.org/user_avatar/forums.synfig.org/nikitakit/32/3541_2.png) [@nikitakit](https://forums.synfig.org/u/nikitakit)
#### Post date: [September 27, 2011, 7:00am UTC](https://forums.synfig.org/t/sif-output-extension-to-ship-in-inkscape-0-49-needs-testing/1526/57 "2011-09-27T07:00:59Z")

</div>

I feel stupid… this is not a problem with doing bad unit conversions - it’s a problem with ignoring the view-box attribute of the SVG. I knew I was ignoring it, but I never thought Inkscape ever set a non-default value.

EDIT: A new version with viewbox support is now online. That should fix the problem.

---

<div class="post-metadata">

### Author: ![jcome](https://forums.synfig.org/user_avatar/forums.synfig.org/jcome/32/3512_2.png) [@jcome](https://forums.synfig.org/u/jcome)
#### Post date: [October 7, 2011, 9:47am UTC](https://forums.synfig.org/t/sif-output-extension-to-ship-in-inkscape-0-49-needs-testing/1526/58 "2011-10-07T09:47:45Z")

</div>

We should list this tool in [synfig.org/cms/en/download/tools/](http://www.synfig.org/cms/en/download/tools/)

---

<div class="post-metadata">

### Author: ![Genete](https://forums.synfig.org/user_avatar/forums.synfig.org/genete/32/8_2.png) [@Genete](https://forums.synfig.org/u/Genete)
#### Post date: [October 7, 2011, 10:30am UTC](https://forums.synfig.org/t/sif-output-extension-to-ship-in-inkscape-0-49-needs-testing/1526/59 "2011-10-07T10:30:19Z")

</div>

> [@jcome](#):
>
> We should list this tool in [synfig.org/cms/en/download/tools/](http://www.synfig.org/cms/en/download/tools/)

Do you want to edit it by your self? I can make you a redactor account at website. I’ll send you the details of the user by email.  
Thanks!  
-G

---

<div class="post-metadata">

### Author: ![jcome](https://forums.synfig.org/user_avatar/forums.synfig.org/jcome/32/3512_2.png) [@jcome](https://forums.synfig.org/u/jcome)
#### Post date: [October 7, 2011, 1:15pm UTC](https://forums.synfig.org/t/sif-output-extension-to-ship-in-inkscape-0-49-needs-testing/1526/60 "2011-10-07T13:15:08Z")

</div>

> [@Genete](#):
>
> > [@jcome](#):
> >
> > We should list this tool in [synfig.org/cms/en/download/tools/](http://www.synfig.org/cms/en/download/tools/)
> 
> Do you want to edit it by your self? I can make you a redactor account at website. I’ll send you the details of the user by email.  
> Thanks!  
> -G

Sure. Please send me the details 🙂

In fact, I just took a look at my mail inbox, I remembered that I had the access right that allows me to edit some context of the site, but I can’t find that mail.

[Previous page](https://forums.synfig.org/t/sif-output-extension-to-ship-in-inkscape-0-49-needs-testing/1526.md?page=2)

[Next page](https://forums.synfig.org/t/sif-output-extension-to-ship-in-inkscape-0-49-needs-testing/1526.md?page=4)
