Importing Inkscape layer information into GIMP

この記事は約5分で読めます。
スポンサーリンク

Things I want to do

SVG images created with Inkscape contain layer information.

However, when you open an SVG image in GIMP, the layer information is lost.

This article explains how to import Inkscape layer information into GIMP.

This explanation assumes you are using Windows 11 as your operating system.

overview

Save the file in Inkedscape format as a GIMP file (*.xcf) and open it with GIMP.

Once you’ve set up the environment, it’s easy afterwards, but the initial setup is a bit of a hassle.

スポンサーリンク

Environment settings

Set the GIMP folder in the PATH.

Press the Windows key and type ‘environment variables’.

You should see ‘Edit environment variables,’ so click on it.

The following dialog box will appear, so select Path and click ‘Edit’.

Click ‘New,’ enter the path to the GIMP executable file, and click ‘OK.’

(In most cases, this is ‘C:\Program Files\GIMP 2\bin’)

Creating hard links

Since the executable file for GIMP needs to be GIMP.exe, we will create a hard link (similar to a shortcut).

Press the Windows key and type ‘command’.

Right-click the displayed command and click ‘Run as administrator’.

Execute the following command at the displayed prompt.

If the installation folder is not ‘C:\Program Files\GIMP 2\bin’, please change it accordingly.

fsutil hardlink create "C:\Program Files\GIMP 2\bin\gimp.exe" "C:\Program Files\GIMP 2\bin\gimp-2.10.exe"

If gimp.exe is present in the installation folder, the installation was successful.

スポンサーリンク

Save in Inkedscape → Open in GIMP

Open the target SVG in Inkedscape.

Select ‘Save As’ from the File menu.

Save the image by selecting GIMP XCT – Preserve Layers (*.xcf) as the file type.

The following message is displayed and it fails.

Traceback (most recent call last):
  File "C:\Program Files\Inkscape\share\inkscape\extensions\gimp_xcf.py", line 205, in <module>
    GimpXcf().run()
  File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\base.py", line 250, in run
    self.save_raw(self.effect())
  File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\base.py", line 296, in save_raw
    self.save(self.options.output)
  File "C:\Program Files\Inkscape\share\inkscape\extensions\gimp_xcf.py", line 200, in save
    with open(xcf, "rb") as fhl:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\ユーザ名\\AppData\\Local\\Temp\\gimp-out-t9tw3_xf\\chama24.xcf.xcf'

コメント

タイトルとURLをコピーしました