lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: eps file


From: David Wright
Subject: Re: eps file
Date: Sat, 4 Sep 2021 22:56:02 -0500
User-agent: Mutt/1.10.1 (2018-07-13)

On Fri 03 Sep 2021 at 21:00:40 (+0200), Valentin Petzel wrote:

> If analyzed your eps-file and have found that it has some very weird bytes in 
> the beginning (also containing some null-chars). This makes rendering the 
> file 
> a bit of a gamble, and it also means that Lilypond does not find any 
> information in this file (as it stops at the first null char).
> 
> So all these list-ref issues actually come from a malformed eps file. The eps 
> file also has 5000 lines of junk in the end, which does not affect Lilypond, 
> as Lilypond does not read further that the null char starting that stuff.

I took a look at the spec. The "junk" at the end, as I pointed out, is
a TIFF file. It's one of the four types of preview image allowed. When
you think about it (which I hadn't, because EPS files barely entered
any workflow of mine, years ago) wysiwyg people need an image to gaze
upon (TeX users are usually used to boxes), but they don't typically
have a PS interpreter built into the display program.

On account of Macs having a resource fork, PCs' EPS formats need an
indication of having a preview, and its location. The first four bytes
"c5 d0 d3 c6" is the correct magic to indicate this. The next byte is
the offset to %!PS-Adobe (leading zeroes following), and the rest is
lengths/offsets and a checksum (here, FFFF ≡ ignore).

> I’ve fixed up the file (it now has less than half of its original size).
> 
> To summarize:
> We’ve encounterd three kinds of issues:
> → The (ice-9 format)-issue, which happens if you use \ instead of / or \\
> → The "cannot find file”-issue, which happens because Lilypond cannot find 
> your file, either because it is a relative path in an unsaved document, or 
> because the file does not exist, or because you do not have read access or 
> something
> → The list-ref/Wrong type argument issue that happes due to the bad eps file.
> 
> So far we have resolved two of these issues, so it remains to solve the 
> „cannot find file”-issue.

I would suggest that the OP rename the stripped file so that it is
easily distinguished from the larger version in the output.

I would also suggest filing a wishlist bug against LP, because it
would seem fairly straightforward for it to be able to handle EPS
files that contain preview images.

Cheers,
David.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]