# pydicom.encaps.generate_pixel_data_frame

`pydicom.encaps.``generate_pixel_data_frame`(bytestream, nr_frames=None)

  Yield an encapsulated pixel data frame.

  Parameters:

  - bytestream (bytes) – The value of the (7FE0,0010) Pixel Data element from an encapsulated dataset. The Basic Offset Table item should be present and the Sequence Delimiter item may or may not be present.
  - nr_frames (int, optional) – Required for multi-frame data when the Basic Offset Table is empty and there are multiple frames. This should be the value of (0028,0008) Number of Frames.

  Yields: | bytes – A frame contained in the encapsulated pixel data.

  References

  DICOM Standard Part 5, Annex A