def get_img_matrix(img):
   
   """(Image) -> list of list of tuple\n
   Takes an image and converts it into a list of list containing (r,g,b) of each pixel of each row
   """
   
   width, height = img.size
   
   # resizing image as the aspect ratio of a 
   # charecter in the terminal is a rectangle compared to the square of pixel
   img.resize((width//2, height//2))
   
   # initializing a list to store the rgb of each pixel of a row in a 2D array for the whole image
   image_list = []
   pxl = img.load()

   for y in range(height):
      row = []
      for x in range(width):
         row.append(pxl[x,y])
      image_list.append(row)
      
   return image_list