def size_from_jpeg(img_data):
  # _size_from_jpeg may throw an exception if the data is malformed, we then
  # return None
  try:
    return _size_from_jpeg(img_data)
  except:
    return None
Get the dimensions of an image from the jpeg data.
dataset/ETHPy150Open CollabQ/CollabQ/common/imageutil.py/size_from_jpeg