Export to tiff fails

Steps to Replicate

  1. Open Inkscape
  2. Draw a shape
  3. Open the Export PNG dialog
  4. Change extension to .tiff
  5. Export
  6. Apply the default options

What happened?

Traceback (most recent call last):
  File "raster_output_tiff.py", line 22, in <module>
    TiffOutput().run()
  File "/path/to/inkscape/share/extensions/inkex/base.py", line 131, in run
    self.save_raw(self.effect())
  File "/path/to/inkscape/share/extensions/inkex/base.py", line 156, in save_raw
    self.save(self.options.output)
  File "raster_output_tiff.py", line 15, in save
    self.img.convert('RGB').save(stream,
  File "/usr/lib/python3/dist-packages/PIL/Image.py", line 2102, in save
    save_handler(self, fp, filename)
  File "/usr/lib/python3/dist-packages/PIL/TiffImagePlugin.py", line 1629, in _save
    offset = ifd.save(fp)
  File "/usr/lib/python3/dist-packages/PIL/TiffImagePlugin.py", line 860, in save
    if fp.tell() == 0:  # skip TIFF header on subsequent pages
OSError: [Errno 29] Illegal seek

Editing the file so stream is replaced by a hardcoded filename stops the issue (but isn't a fix)

As a corollary, editing changing the options gave me a different error (even with the jpeg option):

Traceback (most recent call last):
  File "raster_output_tiff.py", line 22, in <module>
    TiffOutput().run()
  File "/home/nal/all/inkscape/share/extensions/inkex/base.py", line 131, in run
    self.save_raw(self.effect())
  File "/home/nal/all/inkscape/share/extensions/inkex/base.py", line 156, in save_raw
    self.save(self.options.output)
  File "raster_output_tiff.py", line 15, in save
    self.img.convert('RGB').save(stream,
  File "/usr/lib/python3/dist-packages/PIL/Image.py", line 2102, in save
    save_handler(self, fp, filename)
  File "/usr/lib/python3/dist-packages/PIL/TiffImagePlugin.py", line 1531, in _save
    raise ValueError(
ValueError: quality setting only supported for 'jpeg' compression

What should have happened?

  • Export tiff image

Version info

  • Originally reported in comments of https://bugs.archlinux.org/task/72461?project=1&string=inkscape
  • Inkscape 1.2-dev (6e098d9b24, 2021-10-20) Linux Mint 20, Pillow v7.0.0
  • Inkscape 1.1 (c4e8f9e, 2021-05-24) appimage Linux Mint 20
  • Inkscape 1.1.1 (3bf5ae0d25, 2021-09-20) Arch, Pillow v8.3.2

Doesn't occur in Inkscape 1.1 on Windows 10

Edited Oct 20, 2021 by Nathan Lee
Assignee Loading
Time tracking Loading