On Wed, 9 Feb 2022 at 18:11, Pavel Sanda <sa...@lyx.org> wrote:

> On Wed, Feb 09, 2022 at 02:06:17AM +0100, Thibaut Cuvelier wrote:
> > Do you have any trick to debug this further? For the LyX 2.3 issue, it
> > might be a timeout for large EPS; for 2.4, I have no idea.
>
> One thing which come to my mind - do you have set some limits on EPS size
> in imagemagick config?
> In linux you can find various policies like
> <policy domain="resource" name="memory" value="256MiB"/>
> etc  at /etc/ImageMagick-6/policy.xml.
> Perhaps windows install of IM has some limits set?
>
> I looked directly into .eps file and it has so strange binary
> header that I am afraid to open it by ghostscript :)
> The normal header seem to start at line 35 position 5546.
>

I'm using the default configuration of the copy of ImageMagick that comes
with LyX. I must say that only few things are configured: when removing the
comments and the DTD, it's just a few lines.

<?xml version="1.0" encoding="UTF-8"?>
<policymap>
  <policy domain="cache" name="shared-secret" value="passphrase"
stealth="true"/>
</policymap>

If I'm uncommenting the relevant portion, it does not help either:

<policy domain="resource" name="memory" value="2GiB"/>

The version of GhostScript that comes with LyX 2.3.6.1 [i.e. 9.53.3
(2020-10-01)] has no problem displaying the EPS:

gswin64 -dBATCH undisplayable.eps

The bundled ImageMagick (7.0.10.43) takes roughly three seconds, but
produces a PDF with two pages: the first one is either perfect or garbage,
depending on the PDF reader (Acrobat doesn't like it, PDFium doesn't care
and just displays it); the second one is a low-quality version of the
image. (If I ask for a PNG, ImageMagick works fine, except the output image
is far from nice, all pixelated.)

magick undisplayable.eps undisplayable.pdf

The main reason I'm taking this to the dev mailing list is that pdflatex
doesn't have any problem with this file, while LyX does without any useful
information for the user. I believe some tool fails when loading the image,
it would be really nice to tell the user what went wrong (and how they
might solve the problem).
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to