This repository was archived by the owner on Sep 17, 2020. It is now read-only.

Description
Given a small chunk of the bytes (e.g. 0-8192), the headers for JPEG, GIF, PNG, and WebP, and eventually others, could be parsed and the dimensions understood. This function could look like:
public function determineDimensions($fh): array
Where array is a array of integers containing [width, height], for example [8, 32] for an 8x32 image.