Posted: 2006-04-27T11:39:16-07:00
For some formats, up to 2048 bytes are required. Most format can be identified within 80 or so bytes.
Use https://github.com/ImageMagick/ImageMagick/discussions instead.
https://imagemagick.com/discourse-server/
https://imagemagick.com/discourse-server/viewtopic.php?t=6469