'Return a |Jfif| instance having header properties parsed from image
in *stream*.'

@classmethod
def from_stream(cls, stream):

    markers = _JfifMarkers.from_stream(stream)
    px_width = markers.sof.px_width
    px_height = markers.sof.px_height
    horz_dpi = markers.app0.horz_dpi
    vert_dpi = markers.app0.vert_dpi
    return cls(px_width, px_height, horz_dpi, vert_dpi)
