Files
Daniel Bedeleanu 3aafacab12 feat(phase1): implement OpenCV image processing pipeline
- Create ImageProcessor service with EXIF orientation detection
- Implement smart cropping via OpenCV contour detection (10% padding)
- Add text orientation detection using Hough line transform
- Resize and compress images to 1200px with 85% JPEG quality
- Generate 200px square thumbnails with center crop
- Fallback to Pillow if OpenCV fails
- Comprehensive test suite: 28 tests all passing
- File size validation (reject >10MB)
- Graceful error handling for corrupted/invalid images
- Update requirements.txt with opencv-python, piexif, python-magic
2026-04-20 22:17:11 +03:00

42 lines
1.3 KiB
Python

from collections.abc import Callable, Iterable, Mapping
from typing import Any, Final, Literal as L, TypeAlias
from typing_extensions import TypeVar
from .__version__ import version
from .auxfuncs import _Bool, _Var
###
_VT = TypeVar("_VT", default=str)
_Predicate: TypeAlias = Callable[[_Var], _Bool]
_RuleDict: TypeAlias = dict[str, _VT]
_DefDict: TypeAlias = dict[_Predicate, _VT]
###
f2py_version: Final = version
numpy_version: Final = version
options: Final[dict[str, bool]] = ...
sepdict: Final[dict[str, str]] = ...
generationtime: Final[int] = ...
typedef_need_dict: Final[_DefDict[str]] = ...
module_rules: Final[_RuleDict[str | list[str] | _RuleDict]] = ...
routine_rules: Final[_RuleDict[str | list[str] | _DefDict | _RuleDict]] = ...
defmod_rules: Final[list[_RuleDict[str | _DefDict]]] = ...
rout_rules: Final[list[_RuleDict[str | Any]]] = ...
aux_rules: Final[list[_RuleDict[str | Any]]] = ...
arg_rules: Final[list[_RuleDict[str | Any]]] = ...
check_rules: Final[list[_RuleDict[str | Any]]] = ...
stnd: Final[dict[L[1, 2, 3, 4, 5, 6, 7, 8, 9, 0], L["st", "nd", "rd", "th"]]] = ...
def buildmodule(m: Mapping[str, str | Any], um: Iterable[Mapping[str, str | Any]]) -> _RuleDict: ...
def buildapi(rout: Mapping[str, str]) -> tuple[_RuleDict, str]: ...
# namespace pollution
k: str