{"record":{"id":"b587e0c2d11814ab","repo":"calesthio/OpenMontage","slug":"local-image-width-height-ratio-must-be-between-0-4","errorCode":null,"errorMessage":"local image width/height ratio must be between 0.4 and 2.5","messagePattern":"local image width/height ratio must be between 0\\.4 and 2\\.5","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"tools/video/seedance_ark.py","lineNumber":1070,"sourceCode":"        self._validate_image_bytes(path.read_bytes(), str(path))\n\n    @staticmethod\n    def _validate_image_bytes(data: bytes, source: str) -> None:\n        try:\n            from PIL import Image\n\n            with Image.open(io.BytesIO(data)) as image:\n                width, height = image.size\n                image.verify()\n        except Exception as exc:\n            raise ValueError(f\"image is unreadable or corrupt: {source}\") from exc\n        if not (300 <= width <= 6000 and 300 <= height <= 6000):\n            raise ValueError(\n                \"local image width and height must each be 300 to 6000 pixels\"\n            )\n        ratio = width / height\n        if not 0.4 <= ratio <= 2.5:\n            raise ValueError(\n                \"local image width/height ratio must be between 0.4 and 2.5\"\n            )\n\n    def _validate_data_uri(\n        self,\n        value: str,\n        *,\n        suffix_to_mime: dict[str, str],\n        max_bytes: int,\n        label: str,\n    ) -> str:\n        mime, decoded = self._decode_data_uri(\n            value,\n            suffix_to_mime=suffix_to_mime,\n            max_bytes=max_bytes,\n            label=label,\n        )\n        if label == \"image\":","sourceCodeStart":1052,"sourceCodeEnd":1088,"githubUrl":"https://github.com/calesthio/OpenMontage/blob/95e1c3d0ab93482159818560f6a8c8e866b9139f/tools/video/seedance_ark.py#L1052-L1088","documentation":"Error \"local image width/height ratio must be between 0.4 and 2.5\" thrown in calesthio/OpenMontage.","triggerScenarios":"A local reference image has a width/height aspect ratio outside the allowed 0.4-2.5 range.","commonSituations":"See trigger scenarios.","solutions":["Adjust the image so width/height ratio is between 0.4 and 2.5 (crop or pad).","Extreme panoramas or tall strips are not accepted; trim them to a standard aspect ratio."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"95e1c3d0ab93482159818560f6a8c8e866b9139f","analyzedAt":"2026-08-15T06:31:20.014Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}