LyX 2.3 and 2.4 have troubles displaying EPS images
Enrico Forestieri
forenr at lyx.org
Sat Feb 19 10:30:57 UTC 2022
On Sat, Feb 19, 2022 at 03:16:04AM +0100, Thibaut Cuvelier wrote:
>
> I've been back on this issue. I think that slightly changing the call to
> ImageMagick is the best solution, as it will not break things that used to
> work and has the potential of enabling preview of images that did not have.
>
> What do you think about this (minimalist) patch?
Given that your investigation clarified why two images can be found in
an EPS and that the first is the one actually desired, I think this
patch is good and backward compatible.
However, note that you have to also modify the "convert" entry. This was
the name of the driver program in old ImageMagick versions. It is still
present but simlinked to "magick" in recent versions.
> [-- mutt.octet.filter file type: "unified diff output, ASCII text" --]
>
> From ea7db9f8dcd48c5c35622d442b7262929e04feca Mon Sep 17 00:00:00 2001
> From: Thibaut Cuvelier <tcuvelier at lyx.org>
> Date: Sat, 19 Feb 2022 03:11:55 +0100
> Subject: [PATCH 5/5] configure: for EPS to PNG, ask ImageMagick to only
> consider the first image.
>
> Issue discussed in the mailing list: when the EPS contains several images (Adobe Photoshop exports two of them, one being a low-quality TIFF for preview), two files are generated, none with the existing name (prefix: -0 and -1). Hence, LyX thought that there was an error.
> ---
> lib/configure.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/configure.py b/lib/configure.py
> index 17ef38fc6d..6b64dfce58 100644
> --- a/lib/configure.py
> +++ b/lib/configure.py
> @@ -1174,7 +1174,7 @@ def checkConverterEntries():
> checkProg('an EPS -> PDF converter', ['epstopdf'],
> rc_entry = [ r'\converter eps pdf6 "epstopdf --outfile=$$o $$i" ""'])
> #
> - checkProg('an EPS -> PNG converter', ['magick $$i $$o', 'convert $$i $$o'],
> + checkProg('an EPS -> PNG converter', ['magick $$i[0] $$o', 'convert $$i $$o'],
> rc_entry = [ r'\converter eps png "%%" ""'])
> #
> # no agr -> pdf6 converter, since the pdf library used by gracebat is not
> --
> 2.30.1.windows.1
>
--
Enrico
More information about the lyx-devel
mailing list