docs: def from_stream(cls, stream):
          """
          Return |Bmp| instance having header properties parsed from the BMP
          image in *stream*.
          """
          stream_rdr = StreamReader(stream, LITTLE_ENDIAN)
  
          px_width = stream_rdr.read_long(0x12)
          px_height = stream_rdr.read_long(0x16)
  
          horz_px_per_meter = stream_rdr.read_long(0x26)
          vert_px_per_meter = stream_rdr.read_long(0x2A)
  
          horz_dpi = cls._dpi(horz_px_per_meter)
          vert_dpi = cls._dpi(vert_px_per_meter)
  
          return cls(px_width, px_height, horz_dpi, vert_dpi)