code: def _image(pixels, width, height, pack):
      
      image = dmtxImageCreate(pixels, width, height, pack)
      if not image:
          raise PyLibDMTXError('Could not create image')
      else:
          try:
              yield image
          finally:
              dmtxImageDestroy(byref(image))
docs: A context manager for `DmtxImage`, created and destroyed by
      `dmtxImageCreate` and `dmtxImageDestroy`.
  
      Args:
          pixels (:obj:):
          width (int):
          height (int):
          pack (int):
  
      Yields:
          DmtxImage: The created image
  
      Raises:
          PyLibDMTXError: If the image could not be created.