epubcheck icon indicating copy to clipboard operation
epubcheck copied to clipboard

A png when passed thorugh the epubcheck, gets mistaken for JPEG, even tho the magic bytes are correct (when using xxd or hexdump)

Open Mathusan opened this issue 3 months ago • 2 comments

xxd -l 16 ~/Downloads/655780KgekiXnKUjg2_ce.png 00000000: 8950 4e47 0d0a 1a0a 0000 000d 4948 4452 .PNG........IHDR

but in the epubcheck logs

Header bytes (hex): FF D8 FF E0 image/png ERROR(OPF-029): New Bok Copy-RMZPfDDsll.epub/OEBPS/images/5cd54d44-2000-4140-856b-5334d53504ca.png(-1,-1): The file "OEBPS/images/5cd54d44-2000-4140-856b-5334d53504ca.png" does not appear to match the media type image/png, as specified in the OPF file.

Why is this

Mathusan avatar Oct 02 '25 04:10 Mathusan

Image

This is the png used

Mathusan avatar Oct 02 '25 04:10 Mathusan

Thanks for the report and test case! I will have a look.

rdeltour avatar Oct 22 '25 13:10 rdeltour