Inkscape.org
Beyond the Basics Resolution change
  1. #1
    railfan727 railfan727 @railfan727

    I recently upgraded from version 0.91 to the latest version.  To my dismay, I discovered that when I opened one of my existing files, everything was rescaled due to the resolution change from 90 dpi to 96 dpi (done to keep up with CSS standard changes).  In addition, all of the guides were moved.  For my purposes, I did not need these items to be changed; I export my Inkscape files in raster and use them further.  With the scaling changes, the exported files do not align properly for the raster portion of my project.  I did not receive any prompt or dialog box; the files were rescaled automatically without my knowledge and I didn't realize what was happening until I checked some of the dimensions, then read through the release notes.

    Specifically, I draw locomotives as a hobby.  I use Inkscape to make all of the logos, lettering, and numbers but I do all of the basic drawing and painting in raster.  I have attached a sample of one of my finished items.

    Is there any way to load a legacy file WITHOUT the automatic rescaling being performed, or to change everything back to how it was?  I understand that I can just scale everything by 93.75% but that does nothing for basic alignment or guide positioning.  Otherwise I will need to stay with 0.91 and lose out on any new features from that point forward.

    Thank you!

    Scl 1776 10X8
  2. #2
    Freezr Freezr @freezr

    Important changes

    • The default resolution was changed from 90dpi to 96dpi, to match the CSS standard. For more background information, please see the Wiki article about handling of units in Inkscape. Inkscape 0.92 will attempt to identify 'legacy' Inkscape files that need to be converted. If such a file is detected, the user will be offered three options:
      1. Set 'viewBox'. Inkscape will add an appropriate 'viewBox' which will do a global scaling of the document. It will also adjust the document width and height if necessary.
      2. Scale elements. Inkscape will scale each internal element.
      3. Ignore. Do nothing. This is an appropriate choice for documents meant for screen display.

     

    By the way your artwork is pretty cool, once I knew a guy who loved drawing vintage airplanes.

  3. #3
    Tyler Durden Tyler Durden @TylerDurden
    *

    @railfan727, If you did not get the scale change dialog when to document opened in .92x, you might try Menu: Extensions>Document>DPI 96>90.

     

    @Gnuserland, "zerocinquanta" on the old forum made great portraits of vintage aircraft... maybe they are here somewhere under another username.

     

    (EDIT: spelling corrected)

  4. #4
    railfan727 railfan727 @railfan727

    Is there any way to apply the DPI setting globally or will I need to change it on every file individually?  I have literally thousands of individual files that will be affected.

    For now I;m staying with version 0.91 as it's adequate for my purposes but I do want to be prepared to handle the DPI conversion in case I decide to upgrade later on in order to take advantage of any other new features.

    By the way... do the new versions still require fonts to be installed "for all users" in order for Inkscape to be able to see them?  I had to add a dummy user account to my Windows installation in order to activate the "for all users" install option and it was sort of a pain...

  5. #5
    Freezr Freezr @freezr
    *

    @TylerDurden I remember him from the time of the G+ Inkscape circle... But I do not remember his nickname...

    @railfan727 I have not idea if you are in Win, macOS or Linux. My advice is try to keep an old version of Inkscape to handle your previous artwork. On Linux is hard, you should compile the old version by yourself or to use a Virtual Machine just for it.

    EDIT

    On windows you should be able to have both the versions at the same time. Hence keep the .91 for handling your old artwork. However you should be able to process all your files at once with the command line and resize those automatically.

  6. #6
    Tyler Durden Tyler Durden @TylerDurden
    *

    I'd try a test with a copy of an original file, simply using a text editor to replace the version number in the header.

    Substitute:

    inkscape:version="0.91 r13725"
    

    With

    inkscape:version="0.92.2 (5c3e80d, 2017-08-06)"

    If the modified file opens properly, the SVG files could be batch processed with a text editor in a snap.

     

    TD

     

    PS: Vintage aircraft are by @zerocinquanta (Marco)

  7. #7
    Freezr Freezr @freezr

    @TylerDurden Yes is him! 👍

  8. #8
    railfan727 railfan727 @railfan727

    @TylerDurden - I like your solution the best!  My question is... how do I batch process the files?  The only thing I know to do with a text editor is open them up one at a time and paste in the new version number.  I have over 3000 different files spread across hundreds of folders.  The folders are grouped by railroad, then by locomotive type below that.  For example:

    CSX > AC4400, AC6000, B36-7, C40-8, C40-8W, SD40-2,SD60M, SD60I...
    Conrail > B23-7, B36-7, B40-8, C40-8, C40-8W, SD40, SD40-2...

  9. #9
    Tyler Durden Tyler Durden @TylerDurden
    *

    I would use an editor like Notepad++ 

    Here's a YT video (not mine) that demonstrates it.

    https://youtu.be/9j8Djan7Pm0?t=59

     

    Test first.

     

    TD

  10. #10
    railfan727 railfan727 @railfan727
    *

    I upgraded to version 0.92 and followed all of the steps above.  I replaced the version header in all of my existing files before opening anything.

    I then opened a file and discovered that everything had STILL been re-scaled and all of the guides shifted correspondingly.  And there was no dialog box to give me an option to open the file without re-scaling.  Instead of being in nice, neat multiples of 1 pixel, all of my dimensions are now a bunch of nasty decimals thanks to the 96/90 scale factor.

    Fortunately I backed everything up first.  I see absolutely no way forward except to restore my backup files and go back to version 0.91 and never, ever, ever update to anything newer.  Either that or do the Extensions > Document thing for each and every file individually.

    What exactly does that DPI conversion process from the Extensions menu do internally?  Is there a way that I could effect the same changes via text editing so that it could be done in batch?

  11. #11
    railfan727 railfan727 @railfan727

    What factors trigger "dpiswitcher.py" to be run upon opening a file?  Apparently it isn't the Inkscape Version header, as I updated my files via a text editor and they STILL get rescaled upon opening.  Can someone please tell me what other factors are involved in deciding whether this piece of code gets run or not?

  12. #12
    Freezr Freezr @freezr
    *

    Some weeks ago I tried to modify internally the viewport to move the main artboard where I need it must be after several commands. It turned out that it was completely useless, I mean internally Inkscape is a bit complicated, or messy, there are parts that belong to the former Sodipodi, other parts that are standard SVG definition, other parts that are specifically of Inkscape itself. Even if SVG are plain file, if you don't know how SVG files work is quite complicated finding what you need to modify.

    For example if you export in PLAIN svg it should be removing all that part that belong both to Inkscape and Sodipodi, however even with a plain SVG file I was unable to move the artboard just only change the value of the viewport, hence I can't really say what you need to modify to upgrade everything to 96 dpi properly.

    If there is an hint to find a method is here: https://wiki.inkscape.org/wiki/index.php?title=Units_In_Inkscape

  13. #13
    railfan727 railfan727 @railfan727
    *

    Perhaps there's a bit of a misunderstanding here, but I don't care about screen resolution.  I just want to be able to open my existing files without anything getting rescaled at all, or having to back-convert each and every one of them manually after automatic rescaling.  They're perfectly fine as-is.

    I'm searching in vain for whatever line of code in the file triggers the rescaling, because apparently "inkscape:version" isn't it.  Changing the version number within the file from 0.91 to 0.92 had no effect whatsoever on "tricking" Inkscape into believing the file had been created using a newer version and it still rescaled anyway.

    This is a HUGE problem!  All I want is to get it fixed somehow, some way.  The method suggested above did not work at all.

    I am going to downgrade back to 0.91 until somebody can fix this.

  14. #14
    Freezr Freezr @freezr

    You can do a thing... take one of your artwork, duplicate it as yourfile-ink2.svg, open it with Inkscape 0.92 without doing any changes to the resolution and save it. Now use a software that show the difference between files (in Linux I use one called Meld) and compare the two file to see what change were done and what you should replace in the header section.

  15. #15
    railfan727 railfan727 @railfan727

    The only changes (other than the version name) were width, height, and viewbox which will be unique to each image.

  16. #16
    Freezr Freezr @freezr

    I did a test with a very basic file saved from 0.91 into 0.92 and what is changed is almost anything:

    --- /media/sf_Downloads/00-hatch/ink91.svg
    +++ /media/sf_Downloads/00-hatch/ink92.svg
    @@ -15,8 +15,8 @@
        viewBox="0 0 500.00001 500.00001"
        id="svg2"
        version="1.1"
    -   inkscape:version="0.91 r13725"
    -   sodipodi:docname="ink91.svg">
    +   inkscape:version="0.92.2 5c3e80d, 2017-08-06"
    +   sodipodi:docname="ink92.svg">

    Hence you can actually just change the header...

  17. #17
    Tyler Durden Tyler Durden @TylerDurden

    @railfan727, Please PM me via my profile. You can get my email and send me an example SVG file. I will keep it confidential.

     

    TD

  18. #18
    railfan727 railfan727 @railfan727
    *

    I changed the header before opening the file, and it rescaled anyway.

     

    I don't care about CSS standards. All I want to do is work with my existing files without them getting automatically altered. I cannot understand how inkscape makes the decision to invoke the process. The criterion that I thought did it does not.

     

    The only way forward that I see is to continue using 0.91 forever and never get to take advantage of any new features or bug fixes.

     

    I have removed 0.92 from my system and installed 0.91 again. 

  19. #19
    railfan727 railfan727 @railfan727
    *

    How about adding a program preference to turn the automatic DPI conversion on or off? Not everyone who uses this program works with CSS. For those of us who don't, trying to use any version after 0.91 has created massive headaches with files getting rescaled automatically upon opening and having to be changed back manually. 

     

    In my case, the simplest solution was simply to discontinue using the new version and roll back to 0.91. Which is a real shame because I want to be able to take advantage of new features and bug fixes going forward. 

  20. #20
    railfan727 railfan727 @railfan727
    *

    How about adding a program preference to turn the automatic DPI conversion on or off? Not everyone who uses this program works with CSS. For those of us who don't, trying to use any version after 0.91 has created massive headaches with files getting rescaled automatically upon opening and having to be changed back manually. 

     

    In my case, the simplest solution was simply to discontinue using the new version and roll back to 0.91. Which is a real shame because I want to be able to take advantage of new features and bug fixes going forward. 

  21. #21
    railfan727 railfan727 @railfan727
    *

    How about adding a program preference to turn the automatic DPI conversion on or off? Not everyone who uses this program works with CSS. For those of us who don't, trying to use any version after 0.91 has created massive headaches with files getting rescaled automatically upon opening and having to be changed back manually. 

     

    In my case, the simplest solution was simply to discontinue using the new version and roll back to 0.91. Which is a real shame because I want to be able to take advantage of new features and bug fixes going forward. 

  22. #22
    railfan727 railfan727 @railfan727
    *

    How about adding a program preference to turn the automatic DPI conversion on or off? Not everyone who uses this program works with CSS. For those of us who don't, trying to use any version after 0.91 has created massive headaches with files getting rescaled automatically upon opening and having to be changed back manually. 

     

    In my case, the simplest solution was simply to discontinue using the new version and roll back to 0.91. Which is a real shame because I want to be able to take advantage of new features and bug fixes going forward. 

  23. #23
    Freezr Freezr @freezr

    @railfan727

    I did a test with a very basic file, but perhaps, depending by the complexity of the artwork might be involved others xml tags that must be changed, that why I asked to compare the same file saved with the both version of Inkscape.

  24. #24
    railfan727 railfan727 @railfan727

    I already tried that.  The conversion process changed the size and viewbox... but what I want to know is what triggers the conversion.  What does Inkscape look at upon opening a file that causes it to decide that it needs to be rescaled?  The "inkscape:version" tag seems very reasonable... but this is not it.  Changing the version tag prior to opening had no effect on bypassing automatic rescaling.  There is no dialog box that allows me to skip the process or turn it off entirely.  It happens automatically with no control possible from me.

    After the file is rescaled, if I go to the Extensions menu change the DPI back to 90 and save, then reopen, it doesn't get rescaled again.  But with nearly 5000 separate files involved, opening each, automatically rescaling, converting back to 90 dpi, and resaving is simply not feasible.

    What I want to do is to bypass or disable the automatic DPI conversion completely.  I do not work with CSS and the standards change has absolutely zero impact on what I'm doing, other than to create a headache because somebody thought the conversion process needed to be completely automated with no option to bypass it.

    If there is no way to bypass automatic rescaling, then I will be forced to keep version 0.91 and NEVER use anything newer, EVER.

  25. #25
    brynn brynn @brynn
    *

    Inkscape should be offering to fix this, whenever you open a file that was made in an earlier version.  Don't you get a dialog when you first open an older file?

    Granted it's not very clear about which option you want to choose.  But if you read the details, you should be able to sort out which option you want.

  26. #26
    railfan727 railfan727 @railfan727

    No dialog box at all. It just converts with no questions asked. 

  27. #27
    railfan727 railfan727 @railfan727

    No dialog box at all. It just converts with no questions asked. 

  28. #28
    railfan727 railfan727 @railfan727

    No dialog box at all. It just converts with no questions asked. 

  29. #29
    railfan727 railfan727 @railfan727

    Sorry for the triple post. My phone did that. 

  30. #30
    railfan727 railfan727 @railfan727

    Sorry for the triple post. My phone did that. 

  31. #31
    railfan727 railfan727 @railfan727

    @brynn
     

    There is no dialog box.  Can we get an option in the Preferences menu (at the global program level, not at the individual file level) to disable automatic rescaling for those who do not need it for what they're doing?

  32. #32
    Tyler Durden Tyler Durden @TylerDurden

    I did a little exploring... it seems if a .91 file has height and width in pixels, the dialog box is generated with the choices. 

     

    I don't know if the third choice does anything different than the second choice.

    I have no idea what 3D printing has to do with the issue.

    In the attached SVG, I replaced height and width in mm with the equivalent pixels, and triggered the dialog.

    TD

    50Mmsqandguides V91Td
  33. #33
    brynn brynn @brynn

    I'm not sure what the problem might be, that you aren't getting that dialog.  I've tried opening files by double-clicking, and also by opening Inkscape, and then opening the file.  Both ways, I get that dialog.  I'm not able to test opening using the commandline (since I don't understand commandline use).  I would expect Inkscape would still give that dialog, but I don't really know.

    TD, are you saying that if the file is not using px for units, the dialog does not appear?

     

  34. #34
    Tyler Durden Tyler Durden @TylerDurden

    My file with this does not trigger the dialog:

       width="210mm"
       height="297mm"

     

    My file with this does:

       width="744.09448"
       height="1052.3622"

     

    TD

  35. #35
    brynn brynn @brynn

    Interesting.  I wonder if that's a known issue??  To me, it seems a bit buggish.  But of course, I'm no expert.

  36. #36
    Tyler Durden Tyler Durden @TylerDurden

    I don't know, but it is more important to know right now if this can help @railfan727 .  

    Let's pretend one of the selections in the dialog works for their needs... copies of all the files using the mm setting can be batch updated to pixels and used as needed.

    TD

  37. #37
    railfan727 railfan727 @railfan727

    Great news!

    @TylerDurden - Changing the height and width tags, along with the version tag, appears to have done the trick!  I don't get the dialog box or the automatic rescaling... everything opens in V0.92 just the way I expected.

    I am one VERY happy camper right now..........

  38. #38
    Tyler Durden Tyler Durden @TylerDurden

    That is excellent news. I'm glad that is working for you!

     

    TD

  39. #39
    railfan727 railfan727 @railfan727

    I discovered that I also needed to manually edit the export resolution from 90 to 96, in addition to all the changes above.  So, to summarize...

    - Changed Inkscape version

    - Changed dimensions (x and y)

    - Changed export resolution (x and y)

  40. #40
    railfan727 railfan727 @railfan727

    I discovered that I also needed to manually edit the export resolution from 90 to 96, in addition to all the changes above.  So, to summarize...

    - Changed Inkscape version

    - Changed dimensions (x and y)

    - Changed export resolution (x and y)

  41. #41
    Marco Riva Marco Riva @zerocinquanta
    😀😀*


    "@Gnuserland, "zerocinquanta" on the old forum made great portraits of vintage aircraft... maybe they are here somewhere under another username."

    @TylerDurden ... I'm still here (zerocinquanta aka Marco Riva)! (and thank you btw)

  42. #42
    D_5_B_7 D_5_B_7 @D_5_B_7

    Hello.

    I faced this issue and solved my problem.

    I created hundreds of images: ratio 1280 x 720 px, 90dpi.

    After upgrading Inkscape, all of my images would export PNG to 1200 x 675.

    Working on Linux ( this should be available on Windows too ), i resolved this problem, by using regexxer.

    http://regexxer.sourceforge.net/

    This application allows to batch modifiy a text insides tons of different files.

    Using regexxer, i browsed all *.svg, modifying all instances of:

       inkscape:export-xdpi="90"
       by:
       inkscape:export-xdpi="96"
       
       then, again:   
       inkscape:export-ydpi="90"
       by:
       inkscape:export-ydpi="96"
       
    This done, i verifyed if everything was ok, checking the new PNG export with mass render, using Inkscape from command line:

    for file in *.svg; do inkscape $file -e ${file%svg}png; done
       
    I have my files nicely exported back to their original dimensions: 1280 x 720.
       
    And as always, better first make a good backup of all files before test-launching a  batch :)

  43. #43
    -PSi- -PSi- @-PSi-

    I received the message similar to one dispalyed in message # 32 by Tyler Durden for the first time today, when I was looking at my backup server files.

    The window has basically two options:

    • Convert for screen, or
    • Convert for print.

    There is no option saying

    • Do not convert the original file 

    Why not? Why not let me choose to keep the original and edit the version uploaded in computer memory and let me save the modified version using different name (and path)?

    pekka

  44. #44
    jcpompei jcpompei @jcpompei

    This resolution change has caused a real problem for me. Luckily I don't use Inkscape much anymore. I use Mac OS, but Apple stopped supporting 32 bit software. Mojave OS was the last 32 bit software supported. I have hundreds of standards templates made in versions .91 and below. I modify a given template as to shape, size, font and several other parameters using many templates copied and pasted. These are dimensional drawings(in inches and fractions) that the SVG output is used with a Graptec vinyl cutter. The exact size of the given svg drawing is needed in order to cut a vinyl stencil that is applied to a metal surface and them painted.

    I did mess around trying to bring my templates into the 64 bit versions of Inkscape but it was terrible, time consuming and the results weren't suitable.  

    Lucily I had one of my old laptops yet with the Mojave operating system and version .91 of Inkscape. This still had all of my custom Inkscape settings and default new template in tact. I made a bootable USB external hard drive clone of the entire laptop. I couldn't use this laptop anymore because of some physical problems with it but I was able to make a clone of hard drive.

    The odd time I need to use some of my old 32 bit files I just start up with the USB Mojave clone on one of my new laptops and work that way. 

    I never used a Windows machine to design any of my work in Inkscape - always Mac. I know 32 bit versions can still be run on Windows 10. I know this because my vinyl cutter is attached to a Toshiba Windows laptop. I needed to use a Windows machine with the cutter because the cutter was like 10 years old or older when I bought it already and Graphtec never updated the drivers for Apple computers. I think Mac TigerOS were the last cutter drivers that Graphtec supported. The only thing I use the Windows laptop is to plug in a USB from the Mac with the Inkscape SVGs and cut them. Originally when I started using MacOS Tiger and Inkscape 0.47vers the Toshiba machine was on XP. I was able to upgrade to Windows 7 then 10 but stopped there. 

    Incidentally, I have the Wi-Fi turned off on the Mojave clone HDD and also the Windows Toshiba laptop on the vinyl cutter. It's best to just turn off the Wi-Fi so the operating systems don't get accidentally updated to new versions.

    I appreciate the effort that the volunteers put forth in creating and updating Inkscape. Also, it is free software. When I started using the cutter 10 or 12 years ago I didn't want to spend the money to buy Adobe Illustrator or CorelDRAW Graphics Suite. I found that Inkscape did the job quite well.

    As one person commented "It would be nice to use some of the newer version features". I agree, but sometimes progress leaves some of us behind.

    When I do add new standards or templates, fonts and things I just do it with Mojave and version .91.

    I do realize that this didn't help solve any of the other people responding to this topic but to let you guys know there are a lot of us out here with these kinds of issues. Just wanted to share how I've handled it.

     

    Joe