protected static function read_1_byte($handle)
    {
        $c = fgetc($handle);
        if ($c === false) {
            throw new \RuntimeException('Premature EOF in JPEG file', 1363533326);
        }
        return ord($c);
    }