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

Doesn't occur in Inkscape 1.1 on Windows 10

Edited by Nathan Lee