{"record":{"id":"2ea8c84218a559f5","repo":"calesthio/OpenMontage","slug":"local-image-width-and-height-must-each-be-300-to-6","errorCode":null,"errorMessage":"local image width and height must each be 300 to 6000 pixels","messagePattern":"local image width and height must each be 300 to 6000 pixels","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"tools/video/seedance_ark.py","lineNumber":1065,"sourceCode":"            self._probe_local_audio_duration(path)\n        encoded = base64.b64encode(path.read_bytes()).decode(\"ascii\")\n        return f\"data:{mime};base64,{encoded}\"\n\n    def _validate_local_image(self, path: Path) -> None:\n        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,","sourceCodeStart":1047,"sourceCodeEnd":1083,"githubUrl":"https://github.com/calesthio/OpenMontage/blob/95e1c3d0ab93482159818560f6a8c8e866b9139f/tools/video/seedance_ark.py#L1047-L1083","documentation":"Error \"local image width and height must each be 300 to 6000 pixels\" thrown in calesthio/OpenMontage.","triggerScenarios":"A local reference image has width or height outside the allowed 300-6000 pixel range.","commonSituations":"See trigger scenarios.","solutions":["Resize the image so both width and height are between 300 and 6000 pixels.","Crop or pad images that are too small rather than upscaling far beyond the original."],"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-15T22:17:37.221Z"}