question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Error: Input buffer has corrupt header:" for PNG with large XMP metadata

See original GitHub issue

What is the output of running npx envinfo --binaries --languages --system --utilities?

npx envinfo --binaries --languages --system --utilities npx: installed 1 in 2.706s

System: OS: macOS Mojave 10.14.5 CPU: (8) x64 Intel® Core™ i7-7920HQ CPU @ 3.10GHz Memory: 1.36 GB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 12.11.1 - /usr/local/bin/node npm: 6.11.3 - /usr/local/bin/npm Utilities: Make: 3.81 - /usr/bin/make GCC: 10.14. - /usr/bin/gcc Git: 2.20.1 - /usr/bin/git Clang: 1001.0.46.4 - /usr/bin/clang Subversion: 1.10.3 - /usr/bin/svn Languages: Bash: 3.2.57 - /bin/bash Java: 1.8.0_111 - /usr/bin/javac Perl: 5.18.4 - /usr/bin/perl PHP: 7.1.23 - /usr/bin/php Python: 2.7.10 - /usr/bin/python Ruby: 2.3.7 - /usr/bin/ruby

What are the steps to reproduce?

Trying to resize a PNG with large XMP metadata, fails with generic “Input buffer has corrupt header”. If I use imagemagick convert -strip the file it resizes fine.

What is the expected behaviour?

Resize and ignore/strip the metadata

Are you able to provide a standalone code sample, without other dependencies, that demonstrates this problem?

Are you able to provide a sample image that helps explain the problem?

Not sure if able to provide but the image has ~15MB of XMP metadata and ~4MB of image data. When stripped the 4MB image resizes fine.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
lovellcommented, Jan 16, 2020

v0.24.0 is now available with a prebuilt libvips v8.9.0. Thanks for reporting this!

0reactions
kevinludwigcommented, Nov 18, 2019

awesome, thanks for the feedback. Any idea when that may get released?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Node Sharp Throwing An Error "Input Buffer Has Corrupt ...
The typical use case for this high speed Node.js module is to convert ... Error: Input buffer has corrupt header: for PNG with...
Read more >
Errors importing png files - Troubleshooting - Tropy
I am getting a number of errors when I try to import some png files. ... “stack”:“Error: Input buffer has corrupt header: pngload_buffer: ......
Read more >
PNG Specification: Chunk Specifications - W3C
A valid PNG image must contain an IHDR chunk, one or more IDAT chunks, and an IEND chunk. 4.1.1. IHDR Image header. The...
Read more >
pdfToolbox Server - callas software ••• PDF works!
Problem solved, where a PDF without any XMP metadata could not be properly converted to PDF/A in certain cases [FP66490]; Conversion to PDF/A-2/-3/-4:...
Read more >
ffprobe Documentation - FFmpeg
This is especially useful to validate input metadata. ... All headers, but the PNG signature, up to (but not including) the first fcTL...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found