diff --git a/README.md b/README.md index 53a5404..d64cdb3 100644 --- a/README.md +++ b/README.md @@ -132,7 +132,6 @@ You will need: - An Athena host URL. - An OAuth client ID and secret with access to the Athena environment. - An affiliate with Athena enabled. -- `imagemagick` installed on your system and on your path at `magick`. #### Preparing your environment diff --git a/common_utils/__init__.py b/common_utils/__init__.py new file mode 100644 index 0000000..89c7128 --- /dev/null +++ b/common_utils/__init__.py @@ -0,0 +1,5 @@ +"""Utility package for testing and examples. + +This package contains helper functions that are not core to the client library, +but are shared across the examples and the tests. +""" diff --git a/examples/utils/image_generation.py b/common_utils/image_generation.py similarity index 74% rename from examples/utils/image_generation.py rename to common_utils/image_generation.py index 7feb8f2..3b11b0b 100644 --- a/examples/utils/image_generation.py +++ b/common_utils/image_generation.py @@ -1,31 +1,31 @@ -"""Ultra-fast random image creation utilities for maximum throughput.""" +"""Ultra-fast random image creation utilities for maximum throughput. + +This file is intended to be used for generating benign test images for the +purposes of integration testing the client, as is provided as a convenience +for API consumers. +""" import asyncio -import io import random import time from collections.abc import AsyncIterator -from PIL import Image, ImageDraw +import cv2 as cv +import numpy as np from resolver_athena_client.client.models import ImageData # Global cache for reusable objects and constants -_image_cache: dict[ - tuple[int, int], tuple[Image.Image, ImageDraw.ImageDraw] -] = {} +_image_cache: dict[tuple[int, int], np.ndarray] = {} _rng = random.Random() # noqa: S311 - Not used for cryptographic purposes -def _get_cached_image( - width: int, height: int -) -> tuple[Image.Image, ImageDraw.ImageDraw]: - """Get cached image and draw objects, creating if needed.""" +def _get_cached_image(width: int, height: int) -> np.ndarray: + """Get cached image array, creating if needed.""" key = (width, height) if key not in _image_cache: - img = Image.new("RGB", (width, height), (0, 0, 0)) - draw = ImageDraw.Draw(img) - _image_cache[key] = (img, draw) + img = np.zeros((height, width, 3), dtype=np.uint8) + _image_cache[key] = img return _image_cache[key] @@ -45,8 +45,9 @@ def create_random_image( PNG image bytes """ - # Get cached image and draw objects - image, draw = _get_cached_image(width, height) + # Get cached image array + image = _get_cached_image(width, height) + img = image.copy() # Random background color bg_r, bg_g, bg_b = ( @@ -56,21 +57,24 @@ def create_random_image( ) # Fill with background color - draw.rectangle([0, 0, width, height], fill=(bg_r, bg_g, bg_b)) + img[:, :] = (bg_b, bg_g, bg_r) # OpenCV uses BGR # Add single accent rectangle for visual variation - accent_color = (255 - bg_r, 255 - bg_g, 255 - bg_b) + accent_color = (255 - bg_b, 255 - bg_g, 255 - bg_r) # BGR x1, y1 = width // 4, height // 4 x2, y2 = (width * 3) // 4, (height * 3) // 4 - draw.rectangle([x1, y1, x2, y2], fill=accent_color) + img = cv.rectangle(img, (x1, y1), (x2, y2), accent_color, thickness=-1) if img_format.upper() == "RAW_UINT8": - return image.tobytes() + return img.tobytes() - # Convert to PNG bytes - buffer = io.BytesIO() - image.save(buffer, format=img_format) - return buffer.getvalue() + # Convert to PNG/JPEG bytes + ext = f".{img_format.lower()}" + success, buf = cv.imencode(ext, img) + if not success: + err = f"Failed to encode image as {img_format}" + raise RuntimeError(err) + return buf.tobytes() def create_batch_images( @@ -90,29 +94,32 @@ def create_batch_images( """ images: list[bytes] = [] - image, draw = _get_cached_image(width, height) + image = _get_cached_image(width, height) # Pre-calculate accent rectangle coordinates x1, y1 = width // 4, height // 4 x2, y2 = (width * 3) // 4, (height * 3) // 4 for _ in range(count): + img = image.copy() # Random background bg_r, bg_g, bg_b = ( _rng.randint(0, 255), _rng.randint(0, 255), _rng.randint(0, 255), ) - draw.rectangle([0, 0, width, height], fill=(bg_r, bg_g, bg_b)) + img[:, :] = (bg_b, bg_g, bg_r) # OpenCV uses BGR # Complement accent color - accent_color = (255 - bg_r, 255 - bg_g, 255 - bg_b) - draw.rectangle([x1, y1, x2, y2], fill=accent_color) + accent_color = (255 - bg_b, 255 - bg_g, 255 - bg_r) # BGR + img = cv.rectangle(img, (x1, y1), (x2, y2), accent_color, thickness=-1) # Convert to PNG bytes - buffer = io.BytesIO() - image.save(buffer, format="PNG") - images.append(buffer.getvalue()) + success, buf = cv.imencode(".png", img) + if not success: + msg = "Failed to encode image as PNG" + raise RuntimeError(msg) + images.append(buf.tobytes()) return images @@ -196,18 +203,7 @@ async def rate_limited_image_iter( def create_random_image_generator( max_images: int, rate_limit_min_interval_ms: int | None = None ) -> AsyncIterator[ImageData]: - """Generate a stream of random test images. - - Args: - ---- - max_images: Maximum number of images to generate - rate_limit_min_interval_ms: Minimum interval in ms between images - - Yields: - ------ - ImageData objects containing random image bytes - - """ + """Create an async generator for images with optional rate limiting.""" if rate_limit_min_interval_ms is not None: return rate_limited_image_iter(rate_limit_min_interval_ms, max_images) diff --git a/docs/api/transformers.rst b/docs/api/transformers.rst index 22aff0c..5506dbc 100644 --- a/docs/api/transformers.rst +++ b/docs/api/transformers.rst @@ -241,7 +241,7 @@ Transformers accept configuration through their constructors: **ImageResizer Configuration:** * ``target_size``: Tuple of (width, height) for output dimensions -* ``resampling``: PIL resampling algorithm (default: ``Image.LANCZOS``) +* ``resampling``: OpenCV resampling algorithm (default: ``cv.INTER_LINEAR``) * ``maintain_aspect_ratio``: Whether to preserve aspect ratio (default: ``True``) **BrotliCompressor Configuration:** diff --git a/examples/classify_single_example.py b/examples/classify_single_example.py index b12041b..346d3db 100755 --- a/examples/classify_single_example.py +++ b/examples/classify_single_example.py @@ -10,7 +10,7 @@ from dotenv import load_dotenv -from examples.utils.image_generation import create_test_image +from common_utils.image_generation import create_test_image from resolver_athena_client.client.athena_client import AthenaClient from resolver_athena_client.client.athena_options import AthenaOptions from resolver_athena_client.client.channel import ( diff --git a/examples/example.py b/examples/example.py index e4e8220..ce87722 100755 --- a/examples/example.py +++ b/examples/example.py @@ -10,7 +10,7 @@ from dotenv import load_dotenv -from examples.utils.image_generation import iter_images +from common_utils.image_generation import iter_images from examples.utils.streaming_classify_utils import count_and_yield from resolver_athena_client.client.athena_client import AthenaClient from resolver_athena_client.client.athena_options import AthenaOptions diff --git a/pyproject.toml b/pyproject.toml index 0ce20e1..7ba0386 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,7 +27,7 @@ dependencies = [ "grpcio-tools>=1.74.0", "httpx>=0.25.0", "numpy>=2.2.6", - "pillow>=11.3.0", + "opencv-python-headless>=4.13.0.92" ] [project.optional-dependencies] diff --git a/src/resolver_athena_client/client/athena_options.py b/src/resolver_athena_client/client/athena_options.py index 2a616d2..7902223 100644 --- a/src/resolver_athena_client/client/athena_options.py +++ b/src/resolver_athena_client/client/athena_options.py @@ -2,12 +2,13 @@ from dataclasses import dataclass -from PIL.Image import Resampling - from resolver_athena_client.client.correlation import ( CorrelationProvider, HashCorrelationProvider, ) +from resolver_athena_client.client.transformers.core import ( + OpenCVResamplingAlgorithm, +) @dataclass @@ -69,4 +70,6 @@ class AthenaOptions: timeout: float | None = 120.0 keepalive_interval: float | None = None compression_quality: int = 11 # Brotli quality level (0-11) - resampling_algorithm: Resampling = Resampling.LANCZOS + resampling_algorithm: OpenCVResamplingAlgorithm = ( + OpenCVResamplingAlgorithm.BILINEAR + ) diff --git a/src/resolver_athena_client/client/transformers/core.py b/src/resolver_athena_client/client/transformers/core.py index 6fea7b6..8041a28 100644 --- a/src/resolver_athena_client/client/transformers/core.py +++ b/src/resolver_athena_client/client/transformers/core.py @@ -6,10 +6,11 @@ """ import asyncio -from io import BytesIO +import enum import brotli -from PIL import Image +import cv2 as cv +import numpy as np from resolver_athena_client.client.consts import EXPECTED_HEIGHT, EXPECTED_WIDTH from resolver_athena_client.client.models import ImageData @@ -20,6 +21,19 @@ _expected_raw_size = EXPECTED_WIDTH * EXPECTED_HEIGHT * 3 +class OpenCVResamplingAlgorithm(enum.Enum): + """Open CV Resampling Configuration. + + Enum for ease of configuration and type-safety when selecting OpenCV + resampling algorithms. + """ + + NEAREST = cv.INTER_NEAREST + BOX = cv.INTER_AREA + BILINEAR = cv.INTER_LINEAR + LANCZOS = cv.INTER_LANCZOS4 + + def _is_raw_bgr_expected_size(data: bytes) -> bool: """Detect if data is already a raw BGR array of expected size.""" return len(data) == _expected_raw_size @@ -27,7 +41,9 @@ def _is_raw_bgr_expected_size(data: bytes) -> bool: async def resize_image( image_data: ImageData, - sampling_algorithm: Image.Resampling = Image.Resampling.LANCZOS, + sampling_algorithm: OpenCVResamplingAlgorithm = ( + OpenCVResamplingAlgorithm.BILINEAR + ), ) -> ImageData: """Resize an image to expected dimensions. @@ -49,31 +65,23 @@ def process_image() -> tuple[bytes, bool]: return image_data.data, False # No transformation needed # Try to load the image data directly - input_buffer = BytesIO(image_data.data) - - with Image.open(input_buffer) as image: - # Convert to RGB if needed - rgb_image = image.convert("RGB") if image.mode != "RGB" else image - - # Resize if needed - if rgb_image.size != _target_size: - resized_image = rgb_image.resize( - _target_size, sampling_algorithm - ) - else: - resized_image = rgb_image - - rgb_bytes = resized_image.tobytes() - - # Convert RGB to BGR by swapping channels - bgr_bytes = bytearray(len(rgb_bytes)) - - for i in range(0, len(rgb_bytes), 3): - bgr_bytes[i] = rgb_bytes[i + 2] - bgr_bytes[i + 1] = rgb_bytes[i + 1] - bgr_bytes[i + 2] = rgb_bytes[i] - - return bytes(bgr_bytes), True # Data was transformed + img_data_buf = np.frombuffer(image_data.data, dtype=np.uint8) + img = cv.imdecode(img_data_buf, cv.IMREAD_COLOR) + + if img is None: + err = "Failed to decode image data for resizing" + raise ValueError(err) + + if img.shape[0] == EXPECTED_HEIGHT and img.shape[1] == EXPECTED_WIDTH: + resized_img = img + else: + resized_img = cv.resize( + img, _target_size, interpolation=sampling_algorithm.value + ) + + # OpenCV loads in BGR format by default, so we can directly convert to + # bytes + return resized_img.tobytes(), True # Data was transformed # Use thread pool for CPU-intensive processing resized_bytes, was_transformed = await asyncio.to_thread(process_image) diff --git a/tests/client/transformers/test_core.py b/tests/client/transformers/test_core.py index 878ab43..2c41538 100644 --- a/tests/client/transformers/test_core.py +++ b/tests/client/transformers/test_core.py @@ -1,9 +1,8 @@ """Test core transformation functions.""" -from io import BytesIO - +import cv2 as cv +import numpy as np import pytest -from PIL import Image from resolver_athena_client.client.consts import ( EXPECTED_HEIGHT, @@ -19,11 +18,24 @@ def create_test_image( width: int = 100, height: int = 100, mode: str = "RGB" ) -> bytes: - """Create a test image with specified dimensions.""" - img = Image.new(mode, (width, height), color="red") - img_bytes = BytesIO() - img.save(img_bytes, format="PNG") - return img_bytes.getvalue() + """Create a test image with specified dimensions using OpenCV.""" + # Map mode to OpenCV color shape + if mode == "RGB": + color = (255, 0, 0) # Red in RGB + img = np.full((height, width, 3), color, dtype=np.uint8) + elif mode == "L": + color = 76 # Red in grayscale + img = np.full((height, width), color, dtype=np.uint8) + else: + err = f"Unsupported mode: {mode}" + raise ValueError(err) + + success, buf = cv.imencode(".png", img) + if not success: + err = "Failed to encode image to PNG" + raise RuntimeError(err) + + return buf.tobytes() @pytest.mark.asyncio diff --git a/tests/client/transformers/test_hash_pipeline.py b/tests/client/transformers/test_hash_pipeline.py index dcbfeda..8c2cbc1 100644 --- a/tests/client/transformers/test_hash_pipeline.py +++ b/tests/client/transformers/test_hash_pipeline.py @@ -1,10 +1,10 @@ """Tests for hash list behavior throughout the transformation pipeline.""" import hashlib -from io import BytesIO +import cv2 as cv +import numpy as np import pytest -from PIL import Image from resolver_athena_client.client.consts import EXPECTED_HEIGHT, EXPECTED_WIDTH from resolver_athena_client.client.models import ImageData @@ -21,10 +21,17 @@ def create_test_png_image(width: int = 200, height: int = 200) -> bytes: """Create a test PNG image with specified dimensions.""" - img = Image.new("RGB", (width, height), color=(255, 0, 0)) - buffer = BytesIO() - img.save(buffer, format="PNG") - return buffer.getvalue() + + # Create a red RGB image using numpy + img = np.zeros((height, width, 3), dtype=np.uint8) + img[:] = (255, 0, 0) # Red color + + # Encode image as PNG to memory + success, buffer = cv.imencode(".png", img) + if not success: + err = "Failed to encode image as PNG" + raise RuntimeError(err) + return buffer.tobytes() @pytest.mark.asyncio diff --git a/tests/functional/conftest.py b/tests/functional/conftest.py index e7cd324..88385d5 100644 --- a/tests/functional/conftest.py +++ b/tests/functional/conftest.py @@ -1,8 +1,8 @@ import os -import shutil -import subprocess import uuid +import cv2 as cv +import numpy as np import pytest import pytest_asyncio from dotenv import load_dotenv @@ -14,7 +14,30 @@ EXPECTED_WIDTH, MAX_DEPLOYMENT_ID_LENGTH, ) -from tests.utils.image_generation import create_test_image + + +def _create_base_test_image_opencv(width: int, height: int) -> np.ndarray: + """Create a test image using only OpenCV2. + + Creates a simple test pattern with background and accent colors. + + Args: + width: Image width in pixels + height: Image height in pixels + + Returns: + numpy array in BGR format suitable for cv.imencode + """ + # Create a simple test image with random colors + # Background color (blue-green) + img_bgr = np.zeros((height, width, 3), dtype=np.uint8) + img_bgr[:, :] = (100, 150, 200) # BGR format + + # Add an accent rectangle for visual variation + x1, y1 = width // 4, height // 4 + x2, y2 = (width * 3) // 4, (height * 3) // 4 + return cv.rectangle(img_bgr, (x1, y1), (x2, y2), (200, 100, 50), -1) + SUPPORTED_TEST_FORMATS = [ "gif", @@ -25,13 +48,15 @@ "pbm", "pgm", "ppm", - "pxm", "pnm", "sr", "ras", "tiff", "pic", "raw_uint8", + # pxm - OpenCV2 has issues with this format, the docs state it's + # supported, but pxm is also used to mean PBM/PGM/PPM which are supported, + # so it's unclear if this format is truly supported. ] @@ -91,47 +116,40 @@ def valid_formatted_image( request: pytest.FixtureRequest, tmp_path_factory: pytest.TempPathFactory, ) -> bytes: - image_format = request.param - if (magick_path := shutil.which("magick")) is None and ( - magick_path := shutil.which("convert") - ) is None: - pytest.fail( - "ImageMagick 'magick' or 'convert' command not found - cannot " - "run multi-format test" - ) + """Generate test images in various formats using OpenCV2. + Images are cached to disk to avoid regenerating on every test run. + """ + image_format = request.param image_dir = tmp_path_factory.mktemp("images") + base_image = _create_base_test_image_opencv(EXPECTED_WIDTH, EXPECTED_HEIGHT) - base_image_format = "png" - base_image = create_test_image( - EXPECTED_WIDTH, EXPECTED_HEIGHT, img_format=base_image_format - ) - base_image_path = image_dir / "base_image.png" - if not base_image_path.exists(): - with base_image_path.open("wb") as f: - _ = f.write(base_image) - - if image_format == base_image_format: - return base_image - + # Handle raw_uint8 format separately - return raw BGR bytes if image_format == "raw_uint8": - return create_test_image( - EXPECTED_WIDTH, EXPECTED_HEIGHT, img_format="raw_uint8" - ) + return base_image.tobytes() + # Check if image already exists in cache image_path = image_dir / f"test_image.{image_format}" - if not image_path.exists(): - cmd = [magick_path, str(base_image_path), str(image_path)] - _ = subprocess.run( # noqa: S603 - false positive :( - cmd, - check=True, - shell=False, - ) - - if not image_path.exists(): - pytest.fail( - f"Failed to create {image_format} image with command: {cmd}" - ) - - with image_path.open("rb") as f: - return f.read() + if image_path.exists(): + with image_path.open("rb") as f: + return f.read() + + # Convert format using OpenCV2 and cache to disk + # Encode image in the target format + if image_format in ["pgm", "pbm"]: + # PGM and PBM are grayscale, so convert the image to grayscale + gray_image = cv.cvtColor(base_image, cv.COLOR_BGR2GRAY) + success, encoded = cv.imencode(f".{image_format}", gray_image) + else: + success, encoded = cv.imencode(f".{image_format}", base_image) + + if not success: + pytest.fail(f"OpenCV failed to encode image in {image_format} format") + + image_bytes = encoded.tobytes() + + # Cache the image to disk + with image_path.open("wb") as f: + _ = f.write(image_bytes) + + return image_bytes diff --git a/tests/functional/test_classify_single.py b/tests/functional/test_classify_single.py index ae29c60..3fd26ff 100644 --- a/tests/functional/test_classify_single.py +++ b/tests/functional/test_classify_single.py @@ -1,5 +1,6 @@ import pytest +from common_utils.image_generation import create_test_image from resolver_athena_client.client.athena_client import AthenaClient from resolver_athena_client.client.athena_options import AthenaOptions from resolver_athena_client.client.channel import ( @@ -7,7 +8,6 @@ create_channel_with_credentials, ) from resolver_athena_client.client.models import ImageData -from tests.utils.image_generation import create_test_image @pytest.mark.asyncio diff --git a/tests/functional/test_classify_streaming.py b/tests/functional/test_classify_streaming.py index fef9e14..9805e8f 100644 --- a/tests/functional/test_classify_streaming.py +++ b/tests/functional/test_classify_streaming.py @@ -3,9 +3,9 @@ import pytest +from common_utils.image_generation import create_random_image_generator from resolver_athena_client.client.athena_options import AthenaOptions from resolver_athena_client.client.channel import CredentialHelper -from tests.utils.image_generation import create_random_image_generator from tests.utils.streaming_classify_utils import ( classify_images, classify_images_break_on_first_result, diff --git a/tests/functional/test_invalid_affiliate.py b/tests/functional/test_invalid_affiliate.py index 974781e..6684ff2 100644 --- a/tests/functional/test_invalid_affiliate.py +++ b/tests/functional/test_invalid_affiliate.py @@ -3,6 +3,7 @@ import pytest from dotenv import load_dotenv +from common_utils.image_generation import create_test_image from resolver_athena_client.client.athena_client import AthenaClient from resolver_athena_client.client.athena_options import AthenaOptions from resolver_athena_client.client.channel import ( @@ -11,7 +12,6 @@ ) from resolver_athena_client.client.exceptions import AthenaError from resolver_athena_client.client.models import ImageData -from tests.utils.image_generation import create_test_image @pytest.mark.asyncio diff --git a/tests/functional/test_invalid_image.py b/tests/functional/test_invalid_image.py index 2f1758e..68eed41 100644 --- a/tests/functional/test_invalid_image.py +++ b/tests/functional/test_invalid_image.py @@ -2,8 +2,8 @@ from collections.abc import AsyncIterator import pytest -from PIL import UnidentifiedImageError +from common_utils.image_generation import create_test_image from resolver_athena_client.client.athena_client import AthenaClient from resolver_athena_client.client.athena_options import AthenaOptions from resolver_athena_client.client.channel import ( @@ -13,7 +13,6 @@ from resolver_athena_client.client.consts import EXPECTED_HEIGHT, EXPECTED_WIDTH from resolver_athena_client.client.exceptions import AthenaError from resolver_athena_client.client.models import ImageData -from tests.utils.image_generation import create_test_image from tests.utils.streaming_classify_utils import classify_images @@ -39,12 +38,11 @@ async def test_classify_single_invalid_image( image_bytes = b"this is not a valid image file" image_data = ImageData(image_bytes) - with pytest.raises(UnidentifiedImageError) as e: + with pytest.raises( + ValueError, match="Failed to decode image data for resizing" + ) as e: _ = await client.classify_single(image_data) - expected_msg = "cannot identify image file" - assert expected_msg in str(e.value) - except Exception as e: msg = "Unexpected exception during invalid image test" raise AssertionError(msg) from e diff --git a/tests/functional/test_invalid_static_token_auth.py b/tests/functional/test_invalid_static_token_auth.py index 8cd83fb..b7db8f8 100644 --- a/tests/functional/test_invalid_static_token_auth.py +++ b/tests/functional/test_invalid_static_token_auth.py @@ -5,10 +5,10 @@ from dotenv import load_dotenv from grpc.aio import Channel +from common_utils.image_generation import create_test_image from resolver_athena_client.client.athena_client import AthenaClient from resolver_athena_client.client.athena_options import AthenaOptions from resolver_athena_client.client.models.input_model import ImageData -from tests.utils.image_generation import create_test_image def create_channel(host: str, token: str) -> Channel: diff --git a/tests/functional/test_list_deployments.py b/tests/functional/test_list_deployments.py index 4681008..f99b7e6 100644 --- a/tests/functional/test_list_deployments.py +++ b/tests/functional/test_list_deployments.py @@ -1,5 +1,6 @@ import pytest +from common_utils.image_generation import iter_images from resolver_athena_client.client.athena_client import AthenaClient from resolver_athena_client.client.athena_options import AthenaOptions from resolver_athena_client.client.channel import ( @@ -7,7 +8,6 @@ create_channel_with_credentials, ) from resolver_athena_client.client.deployment_selector import DeploymentSelector -from tests.utils.image_generation import iter_images @pytest.mark.asyncio diff --git a/tests/test_classify_single.py b/tests/test_classify_single.py index 91e7e73..d517ca3 100644 --- a/tests/test_classify_single.py +++ b/tests/test_classify_single.py @@ -1,12 +1,12 @@ """Tests for the classify_single method in AthenaClient.""" -import io import uuid from unittest.mock import AsyncMock, Mock +import cv2 as cv import grpc.aio +import numpy as np import pytest -from PIL import Image from resolver_athena_client.client.athena_client import AthenaClient from resolver_athena_client.client.athena_options import AthenaOptions @@ -196,10 +196,11 @@ async def test_classify_single_error_handling( # Create a simple valid image for testing # Create a simple 1x1 pixel image - img = Image.new("RGB", (1, 1), color="red") - img_bytes = io.BytesIO() - img.save(img_bytes, format="PNG") - valid_image_data = ImageData(img_bytes.getvalue()) + img_arr = np.ndarray((1, 1, 3), dtype=np.uint8) + img_arr.fill(255) + success, img = cv.imencode(".png", img_arr, []) + assert success, "Failed to encode test image" + valid_image_data = ImageData(img.tobytes()) # Enable resizing athena_client.options.resize_images = True diff --git a/tests/utils/image_generation.py b/tests/utils/image_generation.py deleted file mode 100644 index dd00f35..0000000 --- a/tests/utils/image_generation.py +++ /dev/null @@ -1,203 +0,0 @@ -"""Ultra-fast random image creation utilities for maximum throughput.""" - -import asyncio -import io -import random -import time -from collections.abc import AsyncIterator - -from PIL import Image, ImageDraw - -from resolver_athena_client.client.models import ImageData - - -def _rgb_to_bgr(raw_rgb: bytes) -> bytes: - data = bytearray(raw_rgb) - for i in range(0, len(data), 3): - data[i], data[i + 2] = data[i + 2], data[i] - return bytes(data) - - -# Global cache for reusable objects and constants -_image_cache: dict[ - tuple[int, int], tuple[Image.Image, ImageDraw.ImageDraw] -] = {} -_rng = random.Random() # noqa: S311 - Not used for cryptographic purposes - - -def _get_cached_image( - width: int, height: int -) -> tuple[Image.Image, ImageDraw.ImageDraw]: - """Get cached image and draw objects, creating if needed.""" - key = (width, height) - if key not in _image_cache: - img = Image.new("RGB", (width, height), (0, 0, 0)) - draw = ImageDraw.Draw(img) - _image_cache[key] = (img, draw) - return _image_cache[key] - - -def create_random_image( - width: int = 160, height: int = 120, img_format: str = "PNG" -) -> bytes: - """Create a minimal random image optimized for maximum speed. - - Args: - width: Width of the test image in pixels (default: 160) - height: Height of the test image in pixels (default: 120) - - Returns: - PNG image bytes - - """ - # Get cached image and draw objects - image, draw = _get_cached_image(width, height) - - # Random background color - bg_r, bg_g, bg_b = ( - _rng.randint(0, 255), - _rng.randint(0, 255), - _rng.randint(0, 255), - ) - - # Fill with background color - draw.rectangle([0, 0, width, height], fill=(bg_r, bg_g, bg_b)) - - # Add single accent rectangle for visual variation - accent_color = (255 - bg_r, 255 - bg_g, 255 - bg_b) - x1, y1 = width // 4, height // 4 - x2, y2 = (width * 3) // 4, (height * 3) // 4 - draw.rectangle([x1, y1, x2, y2], fill=accent_color) - - if img_format.upper() in {"RAW_UINT8", "RAW_UINT8_BGR"}: - return _rgb_to_bgr(image.tobytes()) - - # Convert to PNG bytes - buffer = io.BytesIO() - image.save(buffer, format=img_format) - return buffer.getvalue() - - -def create_batch_images( - count: int, width: int = 160, height: int = 120 -) -> list[bytes]: - """Create multiple images in a batch for maximum efficiency. - - Args: - count: Number of images to generate - width: Width of the test images in pixels - height: Height of the test images in pixels - - Returns: - List of PNG image bytes - - """ - images: list[bytes] = [] - image, draw = _get_cached_image(width, height) - - # Pre-calculate accent rectangle coordinates - x1, y1 = width // 4, height // 4 - x2, y2 = (width * 3) // 4, (height * 3) // 4 - - for _ in range(count): - # Random background - bg_r, bg_g, bg_b = ( - _rng.randint(0, 255), - _rng.randint(0, 255), - _rng.randint(0, 255), - ) - draw.rectangle([0, 0, width, height], fill=(bg_r, bg_g, bg_b)) - - # Complement accent color - accent_color = (255 - bg_r, 255 - bg_g, 255 - bg_b) - draw.rectangle([x1, y1, x2, y2], fill=accent_color) - - # Convert to PNG bytes - buffer = io.BytesIO() - image.save(buffer, format="PNG") - images.append(buffer.getvalue()) - - return images - - -async def iter_images( - max_images: int | None = None, -) -> AsyncIterator[ImageData]: - """Generate random test images with maximum throughput optimization. - - Args: - max_images: Maximum number of images to generate. If None, generates - infinitely. - counter: Optional list with single integer to track number of images - sent. - - Yields: - ImageData objects containing PNG image bytes with random content - - """ - count = 0 - batch_size = 100 # Large batches for maximum efficiency - - while max_images is None or count < max_images: - # Calculate batch size for this iteration - if max_images is not None: - remaining = max_images - count - current_batch_size = min(batch_size, remaining) - else: - current_batch_size = batch_size - - # Generate batch of images - images = create_batch_images(current_batch_size, 160, 120) - - # Yield each image - for img_bytes in images: - yield ImageData(img_bytes) - count += 1 - - -def create_test_image( - width: int = 160, - height: int = 120, - seed: int | None = None, - img_format: str = "PNG", -) -> bytes: - """Create a test image with specified dimensions and optional seed. - - Args: - width: Width of the test image in pixels (default: 160) - height: Height of the test image in pixels (default: 120) - seed: Optional seed for reproducible image generation - img_format: Image format (default: PNG). Other formats like JPEG are - also supported. - - Returns: - image bytes in specified format (default: PNG) - - """ - if seed is not None: - _rng.seed(seed) - - return create_random_image(width, height, img_format) - - -async def rate_limited_image_iter( - min_interval_ms: int, - max_images: int | None = None, -) -> AsyncIterator[ImageData]: - """Generate images with a minimum interval between yields.""" - last_yield_time = time.time() - async for image in iter_images(max_images): - elapsed_ms = (time.time() - last_yield_time) * 1000 - if elapsed_ms < min_interval_ms: - await asyncio.sleep((min_interval_ms - elapsed_ms) / 1000) - yield image - last_yield_time = time.time() - - -def create_random_image_generator( - max_images: int, rate_limit_min_interval_ms: int | None = None -) -> AsyncIterator[ImageData]: - if rate_limit_min_interval_ms is not None: - return rate_limited_image_iter(rate_limit_min_interval_ms, max_images) - - return iter_images(max_images) diff --git a/uv.lock b/uv.lock index 41531a2..58c071e 100644 --- a/uv.lock +++ b/uv.lock @@ -986,6 +986,25 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/78/e3/6690b3f85a05506733c7e90b577e4762517404ea78bab2ca3a5cb1aeb78d/numpy-2.3.2-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:6936aff90dda378c09bea075af0d9c675fe3a977a9d2402f95a87f440f59f619", size = 12977811, upload-time = "2025-07-24T21:29:18.234Z" }, ] +[[package]] +name = "opencv-python-headless" +version = "4.13.0.92" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, + { name = "numpy", version = "2.3.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/79/42/2310883be3b8826ac58c3f2787b9358a2d46923d61f88fedf930bc59c60c/opencv_python_headless-4.13.0.92-cp37-abi3-macosx_13_0_arm64.whl", hash = "sha256:1a7d040ac656c11b8c38677cc8cccdc149f98535089dbe5b081e80a4e5903209", size = 46247192, upload-time = "2026-02-05T07:01:35.187Z" }, + { url = "https://files.pythonhosted.org/packages/2d/1e/6f9e38005a6f7f22af785df42a43139d0e20f169eb5787ce8be37ee7fcc9/opencv_python_headless-4.13.0.92-cp37-abi3-macosx_14_0_x86_64.whl", hash = "sha256:3e0a6f0a37994ec6ce5f59e936be21d5d6384a4556f2d2da9c2f9c5dc948394c", size = 32568914, upload-time = "2026-02-05T07:01:51.989Z" }, + { url = "https://files.pythonhosted.org/packages/21/76/9417a6aef9def70e467a5bf560579f816148a4c658b7d525581b356eda9e/opencv_python_headless-4.13.0.92-cp37-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:5c8cfc8e87ed452b5cecb9419473ee5560a989859fe1d10d1ce11ae87b09a2cb", size = 33703709, upload-time = "2026-02-05T10:24:46.469Z" }, + { url = "https://files.pythonhosted.org/packages/92/ce/bd17ff5772938267fd49716e94ca24f616ff4cb1ff4c6be13085108037be/opencv_python_headless-4.13.0.92-cp37-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:0525a3d2c0b46c611e2130b5fdebc94cf404845d8fa64d2f3a3b679572a5bd22", size = 56016764, upload-time = "2026-02-05T10:26:48.904Z" }, + { url = "https://files.pythonhosted.org/packages/8f/b4/b7bcbf7c874665825a8c8e1097e93ea25d1f1d210a3e20d4451d01da30aa/opencv_python_headless-4.13.0.92-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:eb60e36b237b1ebd40a912da5384b348df8ed534f6f644d8e0b4f103e272ba7d", size = 35010236, upload-time = "2026-02-05T10:28:11.031Z" }, + { url = "https://files.pythonhosted.org/packages/4b/33/b5db29a6c00eb8f50708110d8d453747ca125c8b805bc437b289dbdcc057/opencv_python_headless-4.13.0.92-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:0bd48544f77c68b2941392fcdf9bcd2b9cdf00e98cb8c29b2455d194763cf99e", size = 60391106, upload-time = "2026-02-05T10:30:14.236Z" }, + { url = "https://files.pythonhosted.org/packages/fb/c3/52cfea47cd33e53e8c0fbd6e7c800b457245c1fda7d61660b4ffe9596a7f/opencv_python_headless-4.13.0.92-cp37-abi3-win32.whl", hash = "sha256:a7cf08e5b191f4ebb530791acc0825a7986e0d0dee2a3c491184bd8599848a4b", size = 30812232, upload-time = "2026-02-05T07:02:29.594Z" }, + { url = "https://files.pythonhosted.org/packages/4a/90/b338326131ccb2aaa3c2c85d00f41822c0050139a4bfe723cfd95455bd2d/opencv_python_headless-4.13.0.92-cp37-abi3-win_amd64.whl", hash = "sha256:77a82fe35ddcec0f62c15f2ba8a12ecc2ed4207c17b0902c7a3151ae29f37fb6", size = 40070414, upload-time = "2026-02-05T07:02:26.448Z" }, +] + [[package]] name = "packaging" version = "25.0" @@ -995,104 +1014,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl", hash = "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484", size = 66469, upload-time = "2025-04-19T11:48:57.875Z" }, ] -[[package]] -name = "pillow" -version = "12.0.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/5a/b0/cace85a1b0c9775a9f8f5d5423c8261c858760e2466c79b2dd184638b056/pillow-12.0.0.tar.gz", hash = "sha256:87d4f8125c9988bfbed67af47dd7a953e2fc7b0cc1e7800ec6d2080d490bb353", size = 47008828, upload-time = "2025-10-15T18:24:14.008Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/5d/08/26e68b6b5da219c2a2cb7b563af008b53bb8e6b6fcb3fa40715fcdb2523a/pillow-12.0.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:3adfb466bbc544b926d50fe8f4a4e6abd8c6bffd28a26177594e6e9b2b76572b", size = 5289809, upload-time = "2025-10-15T18:21:27.791Z" }, - { url = "https://files.pythonhosted.org/packages/cb/e9/4e58fb097fb74c7b4758a680aacd558810a417d1edaa7000142976ef9d2f/pillow-12.0.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1ac11e8ea4f611c3c0147424eae514028b5e9077dd99ab91e1bd7bc33ff145e1", size = 4650606, upload-time = "2025-10-15T18:21:29.823Z" }, - { url = "https://files.pythonhosted.org/packages/4b/e0/1fa492aa9f77b3bc6d471c468e62bfea1823056bf7e5e4f1914d7ab2565e/pillow-12.0.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d49e2314c373f4c2b39446fb1a45ed333c850e09d0c59ac79b72eb3b95397363", size = 6221023, upload-time = "2025-10-15T18:21:31.415Z" }, - { url = "https://files.pythonhosted.org/packages/c1/09/4de7cd03e33734ccd0c876f0251401f1314e819cbfd89a0fcb6e77927cc6/pillow-12.0.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:c7b2a63fd6d5246349f3d3f37b14430d73ee7e8173154461785e43036ffa96ca", size = 8024937, upload-time = "2025-10-15T18:21:33.453Z" }, - { url = "https://files.pythonhosted.org/packages/2e/69/0688e7c1390666592876d9d474f5e135abb4acb39dcb583c4dc5490f1aff/pillow-12.0.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d64317d2587c70324b79861babb9c09f71fbb780bad212018874b2c013d8600e", size = 6334139, upload-time = "2025-10-15T18:21:35.395Z" }, - { url = "https://files.pythonhosted.org/packages/ed/1c/880921e98f525b9b44ce747ad1ea8f73fd7e992bafe3ca5e5644bf433dea/pillow-12.0.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d77153e14b709fd8b8af6f66a3afbb9ed6e9fc5ccf0b6b7e1ced7b036a228782", size = 7026074, upload-time = "2025-10-15T18:21:37.219Z" }, - { url = "https://files.pythonhosted.org/packages/28/03/96f718331b19b355610ef4ebdbbde3557c726513030665071fd025745671/pillow-12.0.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:32ed80ea8a90ee3e6fa08c21e2e091bba6eda8eccc83dbc34c95169507a91f10", size = 6448852, upload-time = "2025-10-15T18:21:39.168Z" }, - { url = "https://files.pythonhosted.org/packages/3a/a0/6a193b3f0cc9437b122978d2c5cbce59510ccf9a5b48825096ed7472da2f/pillow-12.0.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:c828a1ae702fc712978bda0320ba1b9893d99be0badf2647f693cc01cf0f04fa", size = 7117058, upload-time = "2025-10-15T18:21:40.997Z" }, - { url = "https://files.pythonhosted.org/packages/a7/c4/043192375eaa4463254e8e61f0e2ec9a846b983929a8d0a7122e0a6d6fff/pillow-12.0.0-cp310-cp310-win32.whl", hash = "sha256:bd87e140e45399c818fac4247880b9ce719e4783d767e030a883a970be632275", size = 6295431, upload-time = "2025-10-15T18:21:42.518Z" }, - { url = "https://files.pythonhosted.org/packages/92/c6/c2f2fc7e56301c21827e689bb8b0b465f1b52878b57471a070678c0c33cd/pillow-12.0.0-cp310-cp310-win_amd64.whl", hash = "sha256:455247ac8a4cfb7b9bc45b7e432d10421aea9fc2e74d285ba4072688a74c2e9d", size = 7000412, upload-time = "2025-10-15T18:21:44.404Z" }, - { url = "https://files.pythonhosted.org/packages/b2/d2/5f675067ba82da7a1c238a73b32e3fd78d67f9d9f80fbadd33a40b9c0481/pillow-12.0.0-cp310-cp310-win_arm64.whl", hash = "sha256:6ace95230bfb7cd79ef66caa064bbe2f2a1e63d93471c3a2e1f1348d9f22d6b7", size = 2435903, upload-time = "2025-10-15T18:21:46.29Z" }, - { url = "https://files.pythonhosted.org/packages/0e/5a/a2f6773b64edb921a756eb0729068acad9fc5208a53f4a349396e9436721/pillow-12.0.0-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:0fd00cac9c03256c8b2ff58f162ebcd2587ad3e1f2e397eab718c47e24d231cc", size = 5289798, upload-time = "2025-10-15T18:21:47.763Z" }, - { url = "https://files.pythonhosted.org/packages/2e/05/069b1f8a2e4b5a37493da6c5868531c3f77b85e716ad7a590ef87d58730d/pillow-12.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a3475b96f5908b3b16c47533daaa87380c491357d197564e0ba34ae75c0f3257", size = 4650589, upload-time = "2025-10-15T18:21:49.515Z" }, - { url = "https://files.pythonhosted.org/packages/61/e3/2c820d6e9a36432503ead175ae294f96861b07600a7156154a086ba7111a/pillow-12.0.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:110486b79f2d112cf6add83b28b627e369219388f64ef2f960fef9ebaf54c642", size = 6230472, upload-time = "2025-10-15T18:21:51.052Z" }, - { url = "https://files.pythonhosted.org/packages/4f/89/63427f51c64209c5e23d4d52071c8d0f21024d3a8a487737caaf614a5795/pillow-12.0.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:5269cc1caeedb67e6f7269a42014f381f45e2e7cd42d834ede3c703a1d915fe3", size = 8033887, upload-time = "2025-10-15T18:21:52.604Z" }, - { url = "https://files.pythonhosted.org/packages/f6/1b/c9711318d4901093c15840f268ad649459cd81984c9ec9887756cca049a5/pillow-12.0.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:aa5129de4e174daccbc59d0a3b6d20eaf24417d59851c07ebb37aeb02947987c", size = 6343964, upload-time = "2025-10-15T18:21:54.619Z" }, - { url = "https://files.pythonhosted.org/packages/41/1e/db9470f2d030b4995083044cd8738cdd1bf773106819f6d8ba12597d5352/pillow-12.0.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bee2a6db3a7242ea309aa7ee8e2780726fed67ff4e5b40169f2c940e7eb09227", size = 7034756, upload-time = "2025-10-15T18:21:56.151Z" }, - { url = "https://files.pythonhosted.org/packages/cc/b0/6177a8bdd5ee4ed87cba2de5a3cc1db55ffbbec6176784ce5bb75aa96798/pillow-12.0.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:90387104ee8400a7b4598253b4c406f8958f59fcf983a6cea2b50d59f7d63d0b", size = 6458075, upload-time = "2025-10-15T18:21:57.759Z" }, - { url = "https://files.pythonhosted.org/packages/bc/5e/61537aa6fa977922c6a03253a0e727e6e4a72381a80d63ad8eec350684f2/pillow-12.0.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:bc91a56697869546d1b8f0a3ff35224557ae7f881050e99f615e0119bf934b4e", size = 7125955, upload-time = "2025-10-15T18:21:59.372Z" }, - { url = "https://files.pythonhosted.org/packages/1f/3d/d5033539344ee3cbd9a4d69e12e63ca3a44a739eb2d4c8da350a3d38edd7/pillow-12.0.0-cp311-cp311-win32.whl", hash = "sha256:27f95b12453d165099c84f8a8bfdfd46b9e4bda9e0e4b65f0635430027f55739", size = 6298440, upload-time = "2025-10-15T18:22:00.982Z" }, - { url = "https://files.pythonhosted.org/packages/4d/42/aaca386de5cc8bd8a0254516957c1f265e3521c91515b16e286c662854c4/pillow-12.0.0-cp311-cp311-win_amd64.whl", hash = "sha256:b583dc9070312190192631373c6c8ed277254aa6e6084b74bdd0a6d3b221608e", size = 6999256, upload-time = "2025-10-15T18:22:02.617Z" }, - { url = "https://files.pythonhosted.org/packages/ba/f1/9197c9c2d5708b785f631a6dfbfa8eb3fb9672837cb92ae9af812c13b4ed/pillow-12.0.0-cp311-cp311-win_arm64.whl", hash = "sha256:759de84a33be3b178a64c8ba28ad5c135900359e85fb662bc6e403ad4407791d", size = 2436025, upload-time = "2025-10-15T18:22:04.598Z" }, - { url = "https://files.pythonhosted.org/packages/2c/90/4fcce2c22caf044e660a198d740e7fbc14395619e3cb1abad12192c0826c/pillow-12.0.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:53561a4ddc36facb432fae7a9d8afbfaf94795414f5cdc5fc52f28c1dca90371", size = 5249377, upload-time = "2025-10-15T18:22:05.993Z" }, - { url = "https://files.pythonhosted.org/packages/fd/e0/ed960067543d080691d47d6938ebccbf3976a931c9567ab2fbfab983a5dd/pillow-12.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:71db6b4c1653045dacc1585c1b0d184004f0d7e694c7b34ac165ca70c0838082", size = 4650343, upload-time = "2025-10-15T18:22:07.718Z" }, - { url = "https://files.pythonhosted.org/packages/e7/a1/f81fdeddcb99c044bf7d6faa47e12850f13cee0849537a7d27eeab5534d4/pillow-12.0.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:2fa5f0b6716fc88f11380b88b31fe591a06c6315e955c096c35715788b339e3f", size = 6232981, upload-time = "2025-10-15T18:22:09.287Z" }, - { url = "https://files.pythonhosted.org/packages/88/e1/9098d3ce341a8750b55b0e00c03f1630d6178f38ac191c81c97a3b047b44/pillow-12.0.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:82240051c6ca513c616f7f9da06e871f61bfd7805f566275841af15015b8f98d", size = 8041399, upload-time = "2025-10-15T18:22:10.872Z" }, - { url = "https://files.pythonhosted.org/packages/a7/62/a22e8d3b602ae8cc01446d0c57a54e982737f44b6f2e1e019a925143771d/pillow-12.0.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:55f818bd74fe2f11d4d7cbc65880a843c4075e0ac7226bc1a23261dbea531953", size = 6347740, upload-time = "2025-10-15T18:22:12.769Z" }, - { url = "https://files.pythonhosted.org/packages/4f/87/424511bdcd02c8d7acf9f65caa09f291a519b16bd83c3fb3374b3d4ae951/pillow-12.0.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b87843e225e74576437fd5b6a4c2205d422754f84a06942cfaf1dc32243e45a8", size = 7040201, upload-time = "2025-10-15T18:22:14.813Z" }, - { url = "https://files.pythonhosted.org/packages/dc/4d/435c8ac688c54d11755aedfdd9f29c9eeddf68d150fe42d1d3dbd2365149/pillow-12.0.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:c607c90ba67533e1b2355b821fef6764d1dd2cbe26b8c1005ae84f7aea25ff79", size = 6462334, upload-time = "2025-10-15T18:22:16.375Z" }, - { url = "https://files.pythonhosted.org/packages/2b/f2/ad34167a8059a59b8ad10bc5c72d4d9b35acc6b7c0877af8ac885b5f2044/pillow-12.0.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:21f241bdd5080a15bc86d3466a9f6074a9c2c2b314100dd896ac81ee6db2f1ba", size = 7134162, upload-time = "2025-10-15T18:22:17.996Z" }, - { url = "https://files.pythonhosted.org/packages/0c/b1/a7391df6adacf0a5c2cf6ac1cf1fcc1369e7d439d28f637a847f8803beb3/pillow-12.0.0-cp312-cp312-win32.whl", hash = "sha256:dd333073e0cacdc3089525c7df7d39b211bcdf31fc2824e49d01c6b6187b07d0", size = 6298769, upload-time = "2025-10-15T18:22:19.923Z" }, - { url = "https://files.pythonhosted.org/packages/a2/0b/d87733741526541c909bbf159e338dcace4f982daac6e5a8d6be225ca32d/pillow-12.0.0-cp312-cp312-win_amd64.whl", hash = "sha256:9fe611163f6303d1619bbcb653540a4d60f9e55e622d60a3108be0d5b441017a", size = 7001107, upload-time = "2025-10-15T18:22:21.644Z" }, - { url = "https://files.pythonhosted.org/packages/bc/96/aaa61ce33cc98421fb6088af2a03be4157b1e7e0e87087c888e2370a7f45/pillow-12.0.0-cp312-cp312-win_arm64.whl", hash = "sha256:7dfb439562f234f7d57b1ac6bc8fe7f838a4bd49c79230e0f6a1da93e82f1fad", size = 2436012, upload-time = "2025-10-15T18:22:23.621Z" }, - { url = "https://files.pythonhosted.org/packages/62/f2/de993bb2d21b33a98d031ecf6a978e4b61da207bef02f7b43093774c480d/pillow-12.0.0-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:0869154a2d0546545cde61d1789a6524319fc1897d9ee31218eae7a60ccc5643", size = 4045493, upload-time = "2025-10-15T18:22:25.758Z" }, - { url = "https://files.pythonhosted.org/packages/0e/b6/bc8d0c4c9f6f111a783d045310945deb769b806d7574764234ffd50bc5ea/pillow-12.0.0-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:a7921c5a6d31b3d756ec980f2f47c0cfdbce0fc48c22a39347a895f41f4a6ea4", size = 4120461, upload-time = "2025-10-15T18:22:27.286Z" }, - { url = "https://files.pythonhosted.org/packages/5d/57/d60d343709366a353dc56adb4ee1e7d8a2cc34e3fbc22905f4167cfec119/pillow-12.0.0-cp313-cp313-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:1ee80a59f6ce048ae13cda1abf7fbd2a34ab9ee7d401c46be3ca685d1999a399", size = 3576912, upload-time = "2025-10-15T18:22:28.751Z" }, - { url = "https://files.pythonhosted.org/packages/a4/a4/a0a31467e3f83b94d37568294b01d22b43ae3c5d85f2811769b9c66389dd/pillow-12.0.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:c50f36a62a22d350c96e49ad02d0da41dbd17ddc2e29750dbdba4323f85eb4a5", size = 5249132, upload-time = "2025-10-15T18:22:30.641Z" }, - { url = "https://files.pythonhosted.org/packages/83/06/48eab21dd561de2914242711434c0c0eb992ed08ff3f6107a5f44527f5e9/pillow-12.0.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:5193fde9a5f23c331ea26d0cf171fbf67e3f247585f50c08b3e205c7aeb4589b", size = 4650099, upload-time = "2025-10-15T18:22:32.73Z" }, - { url = "https://files.pythonhosted.org/packages/fc/bd/69ed99fd46a8dba7c1887156d3572fe4484e3f031405fcc5a92e31c04035/pillow-12.0.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:bde737cff1a975b70652b62d626f7785e0480918dece11e8fef3c0cf057351c3", size = 6230808, upload-time = "2025-10-15T18:22:34.337Z" }, - { url = "https://files.pythonhosted.org/packages/ea/94/8fad659bcdbf86ed70099cb60ae40be6acca434bbc8c4c0d4ef356d7e0de/pillow-12.0.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:a6597ff2b61d121172f5844b53f21467f7082f5fb385a9a29c01414463f93b07", size = 8037804, upload-time = "2025-10-15T18:22:36.402Z" }, - { url = "https://files.pythonhosted.org/packages/20/39/c685d05c06deecfd4e2d1950e9a908aa2ca8bc4e6c3b12d93b9cafbd7837/pillow-12.0.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0b817e7035ea7f6b942c13aa03bb554fc44fea70838ea21f8eb31c638326584e", size = 6345553, upload-time = "2025-10-15T18:22:38.066Z" }, - { url = "https://files.pythonhosted.org/packages/38/57/755dbd06530a27a5ed74f8cb0a7a44a21722ebf318edbe67ddbd7fb28f88/pillow-12.0.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f4f1231b7dec408e8670264ce63e9c71409d9583dd21d32c163e25213ee2a344", size = 7037729, upload-time = "2025-10-15T18:22:39.769Z" }, - { url = "https://files.pythonhosted.org/packages/ca/b6/7e94f4c41d238615674d06ed677c14883103dce1c52e4af16f000338cfd7/pillow-12.0.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:6e51b71417049ad6ab14c49608b4a24d8fb3fe605e5dfabfe523b58064dc3d27", size = 6459789, upload-time = "2025-10-15T18:22:41.437Z" }, - { url = "https://files.pythonhosted.org/packages/9c/14/4448bb0b5e0f22dd865290536d20ec8a23b64e2d04280b89139f09a36bb6/pillow-12.0.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:d120c38a42c234dc9a8c5de7ceaaf899cf33561956acb4941653f8bdc657aa79", size = 7130917, upload-time = "2025-10-15T18:22:43.152Z" }, - { url = "https://files.pythonhosted.org/packages/dd/ca/16c6926cc1c015845745d5c16c9358e24282f1e588237a4c36d2b30f182f/pillow-12.0.0-cp313-cp313-win32.whl", hash = "sha256:4cc6b3b2efff105c6a1656cfe59da4fdde2cda9af1c5e0b58529b24525d0a098", size = 6302391, upload-time = "2025-10-15T18:22:44.753Z" }, - { url = "https://files.pythonhosted.org/packages/6d/2a/dd43dcfd6dae9b6a49ee28a8eedb98c7d5ff2de94a5d834565164667b97b/pillow-12.0.0-cp313-cp313-win_amd64.whl", hash = "sha256:4cf7fed4b4580601c4345ceb5d4cbf5a980d030fd5ad07c4d2ec589f95f09905", size = 7007477, upload-time = "2025-10-15T18:22:46.838Z" }, - { url = "https://files.pythonhosted.org/packages/77/f0/72ea067f4b5ae5ead653053212af05ce3705807906ba3f3e8f58ddf617e6/pillow-12.0.0-cp313-cp313-win_arm64.whl", hash = "sha256:9f0b04c6b8584c2c193babcccc908b38ed29524b29dd464bc8801bf10d746a3a", size = 2435918, upload-time = "2025-10-15T18:22:48.399Z" }, - { url = "https://files.pythonhosted.org/packages/f5/5e/9046b423735c21f0487ea6cb5b10f89ea8f8dfbe32576fe052b5ba9d4e5b/pillow-12.0.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:7fa22993bac7b77b78cae22bad1e2a987ddf0d9015c63358032f84a53f23cdc3", size = 5251406, upload-time = "2025-10-15T18:22:49.905Z" }, - { url = "https://files.pythonhosted.org/packages/12/66/982ceebcdb13c97270ef7a56c3969635b4ee7cd45227fa707c94719229c5/pillow-12.0.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:f135c702ac42262573fe9714dfe99c944b4ba307af5eb507abef1667e2cbbced", size = 4653218, upload-time = "2025-10-15T18:22:51.587Z" }, - { url = "https://files.pythonhosted.org/packages/16/b3/81e625524688c31859450119bf12674619429cab3119eec0e30a7a1029cb/pillow-12.0.0-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:c85de1136429c524e55cfa4e033b4a7940ac5c8ee4d9401cc2d1bf48154bbc7b", size = 6266564, upload-time = "2025-10-15T18:22:53.215Z" }, - { url = "https://files.pythonhosted.org/packages/98/59/dfb38f2a41240d2408096e1a76c671d0a105a4a8471b1871c6902719450c/pillow-12.0.0-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:38df9b4bfd3db902c9c2bd369bcacaf9d935b2fff73709429d95cc41554f7b3d", size = 8069260, upload-time = "2025-10-15T18:22:54.933Z" }, - { url = "https://files.pythonhosted.org/packages/dc/3d/378dbea5cd1874b94c312425ca77b0f47776c78e0df2df751b820c8c1d6c/pillow-12.0.0-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7d87ef5795da03d742bf49439f9ca4d027cde49c82c5371ba52464aee266699a", size = 6379248, upload-time = "2025-10-15T18:22:56.605Z" }, - { url = "https://files.pythonhosted.org/packages/84/b0/d525ef47d71590f1621510327acec75ae58c721dc071b17d8d652ca494d8/pillow-12.0.0-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:aff9e4d82d082ff9513bdd6acd4f5bd359f5b2c870907d2b0a9c5e10d40c88fe", size = 7066043, upload-time = "2025-10-15T18:22:58.53Z" }, - { url = "https://files.pythonhosted.org/packages/61/2c/aced60e9cf9d0cde341d54bf7932c9ffc33ddb4a1595798b3a5150c7ec4e/pillow-12.0.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:8d8ca2b210ada074d57fcee40c30446c9562e542fc46aedc19baf758a93532ee", size = 6490915, upload-time = "2025-10-15T18:23:00.582Z" }, - { url = "https://files.pythonhosted.org/packages/ef/26/69dcb9b91f4e59f8f34b2332a4a0a951b44f547c4ed39d3e4dcfcff48f89/pillow-12.0.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:99a7f72fb6249302aa62245680754862a44179b545ded638cf1fef59befb57ef", size = 7157998, upload-time = "2025-10-15T18:23:02.627Z" }, - { url = "https://files.pythonhosted.org/packages/61/2b/726235842220ca95fa441ddf55dd2382b52ab5b8d9c0596fe6b3f23dafe8/pillow-12.0.0-cp313-cp313t-win32.whl", hash = "sha256:4078242472387600b2ce8d93ade8899c12bf33fa89e55ec89fe126e9d6d5d9e9", size = 6306201, upload-time = "2025-10-15T18:23:04.709Z" }, - { url = "https://files.pythonhosted.org/packages/c0/3d/2afaf4e840b2df71344ababf2f8edd75a705ce500e5dc1e7227808312ae1/pillow-12.0.0-cp313-cp313t-win_amd64.whl", hash = "sha256:2c54c1a783d6d60595d3514f0efe9b37c8808746a66920315bfd34a938d7994b", size = 7013165, upload-time = "2025-10-15T18:23:06.46Z" }, - { url = "https://files.pythonhosted.org/packages/6f/75/3fa09aa5cf6ed04bee3fa575798ddf1ce0bace8edb47249c798077a81f7f/pillow-12.0.0-cp313-cp313t-win_arm64.whl", hash = "sha256:26d9f7d2b604cd23aba3e9faf795787456ac25634d82cd060556998e39c6fa47", size = 2437834, upload-time = "2025-10-15T18:23:08.194Z" }, - { url = "https://files.pythonhosted.org/packages/54/2a/9a8c6ba2c2c07b71bec92cf63e03370ca5e5f5c5b119b742bcc0cde3f9c5/pillow-12.0.0-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:beeae3f27f62308f1ddbcfb0690bf44b10732f2ef43758f169d5e9303165d3f9", size = 4045531, upload-time = "2025-10-15T18:23:10.121Z" }, - { url = "https://files.pythonhosted.org/packages/84/54/836fdbf1bfb3d66a59f0189ff0b9f5f666cee09c6188309300df04ad71fa/pillow-12.0.0-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:d4827615da15cd59784ce39d3388275ec093ae3ee8d7f0c089b76fa87af756c2", size = 4120554, upload-time = "2025-10-15T18:23:12.14Z" }, - { url = "https://files.pythonhosted.org/packages/0d/cd/16aec9f0da4793e98e6b54778a5fbce4f375c6646fe662e80600b8797379/pillow-12.0.0-cp314-cp314-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:3e42edad50b6909089750e65c91aa09aaf1e0a71310d383f11321b27c224ed8a", size = 3576812, upload-time = "2025-10-15T18:23:13.962Z" }, - { url = "https://files.pythonhosted.org/packages/f6/b7/13957fda356dc46339298b351cae0d327704986337c3c69bb54628c88155/pillow-12.0.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:e5d8efac84c9afcb40914ab49ba063d94f5dbdf5066db4482c66a992f47a3a3b", size = 5252689, upload-time = "2025-10-15T18:23:15.562Z" }, - { url = "https://files.pythonhosted.org/packages/fc/f5/eae31a306341d8f331f43edb2e9122c7661b975433de5e447939ae61c5da/pillow-12.0.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:266cd5f2b63ff316d5a1bba46268e603c9caf5606d44f38c2873c380950576ad", size = 4650186, upload-time = "2025-10-15T18:23:17.379Z" }, - { url = "https://files.pythonhosted.org/packages/86/62/2a88339aa40c4c77e79108facbd307d6091e2c0eb5b8d3cf4977cfca2fe6/pillow-12.0.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:58eea5ebe51504057dd95c5b77d21700b77615ab0243d8152793dc00eb4faf01", size = 6230308, upload-time = "2025-10-15T18:23:18.971Z" }, - { url = "https://files.pythonhosted.org/packages/c7/33/5425a8992bcb32d1cb9fa3dd39a89e613d09a22f2c8083b7bf43c455f760/pillow-12.0.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:f13711b1a5ba512d647a0e4ba79280d3a9a045aaf7e0cc6fbe96b91d4cdf6b0c", size = 8039222, upload-time = "2025-10-15T18:23:20.909Z" }, - { url = "https://files.pythonhosted.org/packages/d8/61/3f5d3b35c5728f37953d3eec5b5f3e77111949523bd2dd7f31a851e50690/pillow-12.0.0-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6846bd2d116ff42cba6b646edf5bf61d37e5cbd256425fa089fee4ff5c07a99e", size = 6346657, upload-time = "2025-10-15T18:23:23.077Z" }, - { url = "https://files.pythonhosted.org/packages/3a/be/ee90a3d79271227e0f0a33c453531efd6ed14b2e708596ba5dd9be948da3/pillow-12.0.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c98fa880d695de164b4135a52fd2e9cd7b7c90a9d8ac5e9e443a24a95ef9248e", size = 7038482, upload-time = "2025-10-15T18:23:25.005Z" }, - { url = "https://files.pythonhosted.org/packages/44/34/a16b6a4d1ad727de390e9bd9f19f5f669e079e5826ec0f329010ddea492f/pillow-12.0.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:fa3ed2a29a9e9d2d488b4da81dcb54720ac3104a20bf0bd273f1e4648aff5af9", size = 6461416, upload-time = "2025-10-15T18:23:27.009Z" }, - { url = "https://files.pythonhosted.org/packages/b6/39/1aa5850d2ade7d7ba9f54e4e4c17077244ff7a2d9e25998c38a29749eb3f/pillow-12.0.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:d034140032870024e6b9892c692fe2968493790dd57208b2c37e3fb35f6df3ab", size = 7131584, upload-time = "2025-10-15T18:23:29.752Z" }, - { url = "https://files.pythonhosted.org/packages/bf/db/4fae862f8fad0167073a7733973bfa955f47e2cac3dc3e3e6257d10fab4a/pillow-12.0.0-cp314-cp314-win32.whl", hash = "sha256:1b1b133e6e16105f524a8dec491e0586d072948ce15c9b914e41cdadd209052b", size = 6400621, upload-time = "2025-10-15T18:23:32.06Z" }, - { url = "https://files.pythonhosted.org/packages/2b/24/b350c31543fb0107ab2599464d7e28e6f856027aadda995022e695313d94/pillow-12.0.0-cp314-cp314-win_amd64.whl", hash = "sha256:8dc232e39d409036af549c86f24aed8273a40ffa459981146829a324e0848b4b", size = 7142916, upload-time = "2025-10-15T18:23:34.71Z" }, - { url = "https://files.pythonhosted.org/packages/0f/9b/0ba5a6fd9351793996ef7487c4fdbde8d3f5f75dbedc093bb598648fddf0/pillow-12.0.0-cp314-cp314-win_arm64.whl", hash = "sha256:d52610d51e265a51518692045e372a4c363056130d922a7351429ac9f27e70b0", size = 2523836, upload-time = "2025-10-15T18:23:36.967Z" }, - { url = "https://files.pythonhosted.org/packages/f5/7a/ceee0840aebc579af529b523d530840338ecf63992395842e54edc805987/pillow-12.0.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:1979f4566bb96c1e50a62d9831e2ea2d1211761e5662afc545fa766f996632f6", size = 5255092, upload-time = "2025-10-15T18:23:38.573Z" }, - { url = "https://files.pythonhosted.org/packages/44/76/20776057b4bfd1aef4eeca992ebde0f53a4dce874f3ae693d0ec90a4f79b/pillow-12.0.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:b2e4b27a6e15b04832fe9bf292b94b5ca156016bbc1ea9c2c20098a0320d6cf6", size = 4653158, upload-time = "2025-10-15T18:23:40.238Z" }, - { url = "https://files.pythonhosted.org/packages/82/3f/d9ff92ace07be8836b4e7e87e6a4c7a8318d47c2f1463ffcf121fc57d9cb/pillow-12.0.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:fb3096c30df99fd01c7bf8e544f392103d0795b9f98ba71a8054bcbf56b255f1", size = 6267882, upload-time = "2025-10-15T18:23:42.434Z" }, - { url = "https://files.pythonhosted.org/packages/9f/7a/4f7ff87f00d3ad33ba21af78bfcd2f032107710baf8280e3722ceec28cda/pillow-12.0.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:7438839e9e053ef79f7112c881cef684013855016f928b168b81ed5835f3e75e", size = 8071001, upload-time = "2025-10-15T18:23:44.29Z" }, - { url = "https://files.pythonhosted.org/packages/75/87/fcea108944a52dad8cca0715ae6247e271eb80459364a98518f1e4f480c1/pillow-12.0.0-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5d5c411a8eaa2299322b647cd932586b1427367fd3184ffbb8f7a219ea2041ca", size = 6380146, upload-time = "2025-10-15T18:23:46.065Z" }, - { url = "https://files.pythonhosted.org/packages/91/52/0d31b5e571ef5fd111d2978b84603fce26aba1b6092f28e941cb46570745/pillow-12.0.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d7e091d464ac59d2c7ad8e7e08105eaf9dafbc3883fd7265ffccc2baad6ac925", size = 7067344, upload-time = "2025-10-15T18:23:47.898Z" }, - { url = "https://files.pythonhosted.org/packages/7b/f4/2dd3d721f875f928d48e83bb30a434dee75a2531bca839bb996bb0aa5a91/pillow-12.0.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:792a2c0be4dcc18af9d4a2dfd8a11a17d5e25274a1062b0ec1c2d79c76f3e7f8", size = 6491864, upload-time = "2025-10-15T18:23:49.607Z" }, - { url = "https://files.pythonhosted.org/packages/30/4b/667dfcf3d61fc309ba5a15b141845cece5915e39b99c1ceab0f34bf1d124/pillow-12.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:afbefa430092f71a9593a99ab6a4e7538bc9eabbf7bf94f91510d3503943edc4", size = 7158911, upload-time = "2025-10-15T18:23:51.351Z" }, - { url = "https://files.pythonhosted.org/packages/a2/2f/16cabcc6426c32218ace36bf0d55955e813f2958afddbf1d391849fee9d1/pillow-12.0.0-cp314-cp314t-win32.whl", hash = "sha256:3830c769decf88f1289680a59d4f4c46c72573446352e2befec9a8512104fa52", size = 6408045, upload-time = "2025-10-15T18:23:53.177Z" }, - { url = "https://files.pythonhosted.org/packages/35/73/e29aa0c9c666cf787628d3f0dcf379f4791fba79f4936d02f8b37165bdf8/pillow-12.0.0-cp314-cp314t-win_amd64.whl", hash = "sha256:905b0365b210c73afb0ebe9101a32572152dfd1c144c7e28968a331b9217b94a", size = 7148282, upload-time = "2025-10-15T18:23:55.316Z" }, - { url = "https://files.pythonhosted.org/packages/c1/70/6b41bdcddf541b437bbb9f47f94d2db5d9ddef6c37ccab8c9107743748a4/pillow-12.0.0-cp314-cp314t-win_arm64.whl", hash = "sha256:99353a06902c2e43b43e8ff74ee65a7d90307d82370604746738a1e0661ccca7", size = 2525630, upload-time = "2025-10-15T18:23:57.149Z" }, - { url = "https://files.pythonhosted.org/packages/1d/b3/582327e6c9f86d037b63beebe981425d6811104cb443e8193824ef1a2f27/pillow-12.0.0-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:b22bd8c974942477156be55a768f7aa37c46904c175be4e158b6a86e3a6b7ca8", size = 5215068, upload-time = "2025-10-15T18:23:59.594Z" }, - { url = "https://files.pythonhosted.org/packages/fd/d6/67748211d119f3b6540baf90f92fae73ae51d5217b171b0e8b5f7e5d558f/pillow-12.0.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:805ebf596939e48dbb2e4922a1d3852cfc25c38160751ce02da93058b48d252a", size = 4614994, upload-time = "2025-10-15T18:24:01.669Z" }, - { url = "https://files.pythonhosted.org/packages/2d/e1/f8281e5d844c41872b273b9f2c34a4bf64ca08905668c8ae730eedc7c9fa/pillow-12.0.0-pp311-pypy311_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:cae81479f77420d217def5f54b5b9d279804d17e982e0f2fa19b1d1e14ab5197", size = 5246639, upload-time = "2025-10-15T18:24:03.403Z" }, - { url = "https://files.pythonhosted.org/packages/94/5a/0d8ab8ffe8a102ff5df60d0de5af309015163bf710c7bb3e8311dd3b3ad0/pillow-12.0.0-pp311-pypy311_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:aeaefa96c768fc66818730b952a862235d68825c178f1b3ffd4efd7ad2edcb7c", size = 6986839, upload-time = "2025-10-15T18:24:05.344Z" }, - { url = "https://files.pythonhosted.org/packages/20/2e/3434380e8110b76cd9eb00a363c484b050f949b4bbe84ba770bb8508a02c/pillow-12.0.0-pp311-pypy311_pp73-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:09f2d0abef9e4e2f349305a4f8cc784a8a6c2f58a8c4892eea13b10a943bd26e", size = 5313505, upload-time = "2025-10-15T18:24:07.137Z" }, - { url = "https://files.pythonhosted.org/packages/57/ca/5a9d38900d9d74785141d6580950fe705de68af735ff6e727cb911b64740/pillow-12.0.0-pp311-pypy311_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bdee52571a343d721fb2eb3b090a82d959ff37fc631e3f70422e0c2e029f3e76", size = 5963654, upload-time = "2025-10-15T18:24:09.579Z" }, - { url = "https://files.pythonhosted.org/packages/95/7e/f896623c3c635a90537ac093c6a618ebe1a90d87206e42309cb5d98a1b9e/pillow-12.0.0-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:b290fd8aa38422444d4b50d579de197557f182ef1068b75f5aa8558638b8d0a5", size = 6997850, upload-time = "2025-10-15T18:24:11.495Z" }, -] - [[package]] name = "platformdirs" version = "4.5.0" @@ -1296,7 +1217,7 @@ dependencies = [ { name = "httpx" }, { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, { name = "numpy", version = "2.3.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, - { name = "pillow" }, + { name = "opencv-python-headless" }, ] [package.dev-dependencies] @@ -1330,7 +1251,7 @@ requires-dist = [ { name = "grpcio-tools", specifier = ">=1.74.0" }, { name = "httpx", specifier = ">=0.25.0" }, { name = "numpy", specifier = ">=2.2.6" }, - { name = "pillow", specifier = ">=11.3.0" }, + { name = "opencv-python-headless", specifier = ">=4.13.0.92" }, ] [package.metadata.requires-dev]