lilypond-user
[Top][All Lists]
Advanced

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

Re: Including an EPS


From: Mike Kilmer
Subject: Re: Including an EPS
Date: Sat, 17 Dec 2022 14:30:24 -0600

Thanks, Jean.

With upgrade, compilation still failed, but it was in fact the eps file and/or 
its format that compiler was choking on.

Here you can see the (truncated) diff btwn the (first) one that DID work (from 
my vector editor) and the one that pyqrcode generated:

diff --git a/longdarkroad.eps b/longdarkroad.eps
index 9050b61..2842f16 100644

--- a/longdarkroad.eps The working one
+++ b/longdarkroad.eps The breaking one

@@ -1,1553 +1,65 @@

-%!PS-Adobe-3.0 EPSF-3.0
-%%HiResBoundingBox: 0 0 152.5 152.5
-%%BoundingBox: 0 0 153 153
-%%Creator: Serif Affinity
-%LanguageLevel: 3
-%%DocumentData: Clean7Bit
-%ADO_ContainsXMP: MainFirst
-%%EndComments
-%%BeginProlog
-101 dict begin
-/m/moveto
-/l/lineto
-/c/curveto
-3{load def}repeat
-%%EndProlog
-/currentdistillerparams where
-{pop currentdistillerparams /CoreDistVersion get 5000 lt} {true} ifelse
-{userdict /EPSHandler1_pdfmark /cleartomark load put
-userdict /EPSHandler1_ReadMetadata_pdfmark {flushfile cleartomark} bind put}
-{ userdict /EPSHandler1_pdfmark /pdfmark load put
-userdict /EPSHandler1_ReadMetadata_pdfmark {/PUT pdfmark} bind put } ifelse
-[/NamespacePush EPSHandler1_pdfmark
-[/_objdef {eps_metadata_stream} /type /stream /OBJ EPSHandler1_pdfmark
-[{eps_metadata_stream} 2 dict begin
-/Type /Metadata def /Subtype /XML def currentdict end /PUT EPSHandler1_pdfmark
-[{eps_metadata_stream}
-currentfile 0 (% &&end EPS XMP packet marker&&)
-/SubFileDecode filter EPSHandler1_ReadMetadata_pdfmark
-<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
-<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 5.5.0">
- <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";>
-  <rdf:Description rdf:about=""
-    xmlns:exif="http://ns.adobe.com/exif/1.0/";
-    xmlns:tiff="http://ns.adobe.com/tiff/1.0/";
-    xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/";
-    xmlns:xmp="http://ns.adobe.com/xap/1.0/";
-    xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/";
-    xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#";
-   exif:PixelXDimension="152"
-   exif:PixelYDimension="152"
-   exif:ColorSpace="65535"
-   tiff:ImageWidth="152"
-   tiff:ImageLength="152"
-   tiff:ResolutionUnit="2"
-   tiff:XResolution="72.0"
-   tiff:YResolution="72.0"
-   photoshop:ColorMode="1"
-   photoshop:ICCProfile="Greyscale D50"
-   xmp:ModifyDate="2022-12-17T13:54:57-06:00"
-   xmp:MetadataDate="2022-12-17T13:54:57-06:00">
-   <xmpMM:History>
-    <rdf:Seq>
-     <rdf:li
-      stEvt:action="produced"
-      stEvt:softwareAgent="Affinity Designer 1.10.1"
-      stEvt:when="2022-12-17T13:54:57-06:00"/>
-    </rdf:Seq>
-   </xmpMM:History>
-  </rdf:Description>
- </rdf:RDF>
-</x:xmpmeta>
-<?xpacket end="w"?>
-% &&end EPS XMP packet marker&&
-[/Document
-1 dict begin /Metadata {eps_metadata_stream} def
-currentdict end /BDC EPSHandler1_pdfmark
-[/NamespacePop EPSHandler1_pdfmark
-
-gsave
- 
- % Curves
-   newpath
-   117.5 11.25 122.5 11.25 122.5 11.25 c
-   125 11.25 m
-   125 11.25 127.5 11.25 127.5 11.25 c
-   130 11.25 m
-   130 11.25 132.5 11.25 132.5 11.25 c truncated for brevity
-   /DeviceGray setcolorspace
-   0 setcolor
-   2.5 setlinewidth
-   0 setlinecap
-   0 setlinejoin
-   2 setmiterlimit
-   [] 0 setdash
-   stroke
- grestore
-showpage
-end
-/currentdistillerparams where
-{pop currentdistillerparams /CoreDistVersion get 5000 lt} {true} ifelse
-{userdict /EPSHandler1_pdfmark /cleartomark load put}
-{ userdict /EPSHandler1_pdfmark /pdfmark load put} ifelse
-[/EMC EPSHandler1_pdfmark

+%!PS-Adobe-3.0 EPSF-3.0
+%%Creator: PyQRCode <https://pypi.python.org/pypi/PyQRCode/>
+%%CreationDate: 2022-12-17 13:57:19
+%%DocumentData: Clean7Bit
+%%BoundingBox: 0 0 152.5 152.5
+/M { moveto } bind def
+/m { rmoveto } bind def
+/l { rlineto } bind def
+2.5 2.5 scale
+newpath
+4 49.5 M 9 0 m 1 0 l 3 0 m 4 0 l 2 0 m 1 0 l 3 0 m 2 0 l 3 0 m 5 0 l 1 0 m 1 0 
l 3 0 m 7 0 l
truncated for brevity
+4 4.5 M 7 0 l 2 0 m 3 0 l 1 0 m 1 0 l 3 0 m 1 0 l 1 0 m 1 0 l 1 0 m 1 0 l 7 0 
m 2 0 l 8 0 m 1 0 l 1 0 m 1 0 l 1 0 m 2 0 l 1 0 m 1 0 l 1 0 m 1 0 l
+stroke
+%%EOF

This is the Python code I've been using to generate the EPS, which utilizes the 
Python Image Library (via qrcode):

# Importing library
import qrcode

# Data to encode
data = 
"https://www.dropbox.com/scl/fo/frn8pgmnsfmkytdnzo2wp/h?dl=0&rlkey=r9sjjz396ij5r9clg14c47cga";

# Creating an instance of QRCode class
qr = qrcode.QRCode(version=1, box_size=30, border=3)

# Adding data to the instance 'qr'
qr.add_data(data)

qr.make(fit=True)
img = qr.make_image(fill_color='#000000', back_color='white')

img.save('longdarkroad.eps', lossless = True)

> On Dec 17, 2022, at 10:49 AM, Jean Abou Samra <jean@abou-samra.fr> wrote:
> 
> Le 17/12/2022 à 17:41, Mike Kilmer a écrit :
>> Hi.
>> 
>> I'm using GNU LilyPond 2.22.2 (running Guile 2.2)
> 
> The first thing I would check is whether this reproduces with LilyPond 2.24, 
> which has been released this week. LilyPond 2.22 does not officially support 
> Guile 2.2.
> 
> Otherwise, reading the source code, I think this error might happen if you 
> have a malformed EPS file. Did you check that it's really an EPS file? Can 
> you send it?
> 
> Best,
> Jean
> 
> 




reply via email to

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