Failed internal import of transparent png from ps/pdf (transparent parts are grey, rest are transparent)
Migrated from https://bugs.launchpad.net/inkscape/+bug/1713450
From 2017-08-28
Summary:
evanubuntu wrote...
I am trying to import a postscript file created using the Generic Mapping Tools program grdimage. The import fails to import anything that has colour in the image, and the transparency mask is rendered as an opaque grey colour. Using the poppler import is more successful, but it heavily smooths the image, which is not desirable. I tried converting the postscript file to PDF (using ps2pdf), but the imported result is the same.
There is some further discussion of this issue on the Generic Mapping Tools message forum:
Sample attachments:
https://bugs.launchpad.net/inkscape/+bug/1713450/+attachment/4940024/+files/thk_plot_20000.ps
thk_plot_20000.pdf
Additional Notes/Comments:
Alvin Penner (apenner) wrote on 2017-08-28:
- reproduced on Windows 10, Inkscape 0.92.2 (5c3e80d, 2017-08-06) using the internal import option
- also reproduced on Inkscape 0.47pre1
- Inkscape 1.0.1(1.0.1+r73+1), Ubuntu 18.04.5 LTS crashes consistently with an "Internal Error. Inkscape will close now" message (Import window in immediate background)
- Inkscape 1.1-dev (cc619caa4c, 2020-09-10), snap package, Ubuntu 18.04.5 LTS, throws this error, most likely because it's a snap package without necessary permissions...
Error message
/snap/inkscape/7975/share/inkscape/extensions/inkex/command.py:114: DeprecationWarning: invalid escape sequence \*
"""Compile arguments and keyword arguments into a list of strings which Popen will understand.
Traceback (most recent call last):
File "ps_input.py", line 41, in
PostscriptInput().run()
File "/snap/inkscape/7975/share/inkscape/extensions/inkex/base.py", line 140, in run
self.load_raw()
File "/snap/inkscape/7975/share/inkscape/extensions/inkex/extensions.py", line 101, in load_raw
document = self.call(input_file, output_file) or output_file
File "ps_input.py", line 38, in call
call('ps2pdf', crop, input_file, output_file)
File "/snap/inkscape/7975/share/inkscape/extensions/inkex/command.py", line 188, in call
return _call(program, *args, **kwargs)
File "/snap/inkscape/7975/share/inkscape/extensions/inkex/command.py", line 177, in _call
raise ProgramRunError("Return Code: {}: {}\n{}\nargs: {}".format(
inkex.command.ProgramRunError: Return Code: 1: b"GPL Ghostscript 9.50: Can't find initialization file gs_init.ps.\n"
b''
args: ['/snap/inkscape/7975/usr/bin/ps2pdf', '/home/greytomorrow/Documents/Projects/inkscape_bugs/thk_plot_20000.ps', '/tmp/inktmplsgzc5x3/output.pdf']
Version Info:
Original issue:
- Inkscape Version: 0.92.2
- Operating System: Ubuntu 16.04
Tested (and replicated) on:
- Inkscape Version: 1.1-dev (b471b9b, 2020-09-09)
- Operating System: macOS 10.13.6 (17G12034)