Converts images to Python code for embedding in games
Uses Pygame for image loading - NO PILLOW REQUIRED
def image_to_python_code(image_path: str, output_var_name: str = 'image_data', max_size: Optional[Tuple[int, int]] = None, method: str = 'compressed', quality: float = 1.0) -> str
def _resize_surface(surface: pygame.Surface, target_size: Tuple[int, int]) -> pygame.Surface
def _to_pixel_array(surface: pygame.Surface, width: int, height: int, var_name: str) -> str
def _to_base64(surface: pygame.Surface, width: int, height: int, var_name: str) -> str
def _to_compressed_optimized(surface: pygame.Surface, width: int, height: int, var_name: str) -> str
def create_image_from_code(image_data: dict) -> pygame.Surface
def _from_pixel_array(image_data: dict) -> pygame.Surface
def _from_encoded_data(image_data: dict) -> pygame.Surface
Helper class for working with embedded images
def __init__(self: Any, image_data: dict) -> Any
def surface(self: Any) -> pygame.Surface
def width(self: Any) -> int
def height(self: Any) -> int
def draw(self: Any, renderer: Any, x: int, y: int) -> Any