This post is not to ask a question, but rather to share an answer. :)
We are converting thousands of figures from FrameMaker anchored frames to SVG. I can configure FrameMaker to export anchored frames as EPS. Many figures have lossless bitmaps in the EPS, such as screen captures, and the EPS export keeps them lossless.
However, when using Inkscape to convert from EPS to SVG, I found that the lossless bitmaps were being lossy-compressed. This was happening in the EPS import, which internally uses ps2pdf, which itself uses Ghostscript.
I was able to resolve this by manually modifying the following file:
Below is the message above, without the formatted text, which makes part of the message unreadable. (I think this is a bug in the forum that causes this.)
Hi all,
This post is not to ask a question, but rather to share an answer. :)
We are converting thousands of figures from FrameMaker anchored frames to SVG. I can configure FrameMaker to export anchored frames as EPS. Many figures have lossless bitmaps in the EPS, such as screen captures, and the EPS export keeps them lossless.
However, when using Inkscape to convert from EPS to SVG, I found that the lossless bitmaps were being lossy-compressed. This was happening in the EPS import, which internally uses ps2pdf, which itself uses Ghostscript.
I was able to resolve this by manually modifying the following file:
Hi all,
This post is not to ask a question, but rather to share an answer. :)
We are converting thousands of figures from FrameMaker anchored frames to SVG. I can configure FrameMaker to export anchored frames as EPS. Many figures have lossless bitmaps in the EPS, such as screen captures, and the EPS export keeps them lossless.
However, when using Inkscape to convert from EPS to SVG, I found that the lossless bitmaps were being lossy-compressed. This was happening in the EPS import, which internally uses ps2pdf, which itself uses Ghostscript.
I was able to resolve this by manually modifying the following file:
and modifying the following line:
call('ps2pdf', '-dAutoFilterColorImages=false', '-dAutoFilterGrayImages=false', '-dColorImageFilter=/FlateEncode', '-dGrayImageFilter=/FlateEncode', crop, input_file, output_file)
This is a hardcoded change rather than an option, but for our needs it gets the job done!
(If there is a way to specify additional GS options for EPS import and I missed it, please let me know!)
- Chris
Below is the message above, without the formatted text, which makes part of the message unreadable. (I think this is a bug in the forum that causes this.)
Hi all,
This post is not to ask a question, but rather to share an answer. :)
We are converting thousands of figures from FrameMaker anchored frames to SVG. I can configure FrameMaker to export anchored frames as EPS. Many figures have lossless bitmaps in the EPS, such as screen captures, and the EPS export keeps them lossless.
However, when using Inkscape to convert from EPS to SVG, I found that the lossless bitmaps were being lossy-compressed. This was happening in the EPS import, which internally uses ps2pdf, which itself uses Ghostscript.
I was able to resolve this by manually modifying the following file:
<inkscape-1.0beta2>/usr/share/inkscape/extensions/ps_input.py
and modifying the following line:
call('ps2pdf', '-dAutoFilterColorImages=false', '-dAutoFilterGrayImages=false', '-dColorImageFilter=/FlateEncode', '-dGrayImageFilter=/FlateEncode', crop, input_file, output_file)
This is a hardcoded change rather than an option, but for our needs it gets the job done!
(If there is a way to specify additional GS options for EPS import and I missed it, please let me know!)
- Chris