from pathlib import Path

def is_valid_img_frmt(img_path : str):
  sufx = Path(img_path).suffix.lower()
  return sufx in {".png", ".bmp"}

class ImgFrmtErr(Exception):
  def __init__(self, img_path : str):
    self.img_path = img_path

class EncFitErr(Exception):
  def __init__(self, enc_size : int, img_size : int):
    self.enc_size = enc_size
    self.img_size = img_size

class HeadrErr(Exception):
  def __init__(self):
    pass

class HeadrVersnErr(Exception):
  def __init__(self, version : list[int]):
    self.version = version

