my( $width, $height ) = unpack 'I2', substr $data, $offset, 8;