wvanbergen / chunky_png

Read/write access to PNG images in pure Ruby.
https://chunkypng.com
MIT License
1.05k stars 101 forks source link

Output is non-deterministic #172

Closed gregorw closed 9 months ago

gregorw commented 9 months ago

We have a test case where we compare the generated PDF with a file on disk. Unfortunately, these two files never match due to the following differences:

 17 0 obj
-<</ModDate(D:20240214000000+01'00')/Producer(HexaPDF version 0.36.0)>>
+<</ModDate(D:20240131115730+01'00')/Producer(HexaPDF version 0.36.0)>>
 endobj
 xref
 0 18
@@ -120,7 +120,7 @@ xref
 0000009843 00000 n
 0000011337 00000 n
 trailer
-<</Root 3 0 R/ID[(�Q������#?n�n)(�Q������#?n�n)]/Info 17 0 R/Size 18>>
+<</Root 3 0 R/ID[(��/-kϸ2N�R<�R�)(��/-kϸ2N�R<�R�)]/Info 17 0 R/Size 18>>
 startxref
 11424
 %%EOF

Even if we freeze time using travel_to we get different outputs each time.

It would be great to have a deterministic output, i.e. the exact same output for the same input.

gregorw commented 9 months ago

wrong project