code: def from_image(cls, img_filename, mipmap=False, **kwargs):
          
          img = pyglet.image.load(img_filename)
          tex = img.get_mipmapped_texture() if mipmap else img.get_texture()
          gl.glBindTexture(gl.GL_TEXTURE_2D, 0)
          return cls(id=tex.id, data=tex, mipmap=mipmap, **kwargs)
docs: Uses Pyglet's image.load function to generate a Texture from an image file. If 'mipmap', then texture will
          have mipmap layers calculated.