{"record":{"id":"815aae0023c3b726","repo":"Intervention/image","slug":"failed-to-apply-intervention-image-drivers-imagick-815aae","errorCode":null,"errorMessage":"Failed to apply Intervention\\Image\\Drivers\\Imagick\\Modifiers\\DrawLineModifier, unable to build ImagickDraw object","messagePattern":"Failed to apply Intervention\\\\Image\\\\Drivers\\\\Imagick\\\\Modifiers\\\\DrawLineModifier, unable to build ImagickDraw object","errorType":"exception","errorClass":"ModifierException","httpStatus":null,"severity":"error","filePath":"src/Drivers/Imagick/Modifiers/DrawLineModifier.php","lineNumber":66,"sourceCode":"        try {\n            $drawing = new ImagickDraw();\n            $drawing->setStrokeWidth($this->drawable->width());\n            $drawing->setFillOpacity(0);\n\n            if ($this->drawable->hasBackgroundColor()) {\n                $drawing->setStrokeColor($color);\n            }\n\n            $drawing->line(\n                $this->drawable->start()->x(),\n                $this->drawable->start()->y(),\n                $this->drawable->end()->x(),\n                $this->drawable->end()->y(),\n            );\n\n            return $drawing;\n        } catch (ImagickException | ImagickDrawException $e) {\n            throw new ModifierException(\n                'Failed to apply ' . self::class . ', unable to build ImagickDraw object',\n                previous: $e,\n            );\n        }\n    }\n}\n","sourceCodeStart":48,"sourceCodeEnd":73,"githubUrl":"https://github.com/Intervention/image/blob/5598b9e39751c34afc5cdee84abef77f92c26f68/src/Drivers/Imagick/Modifiers/DrawLineModifier.php#L48-L73","documentation":"Error \"Failed to apply Intervention\\Image\\Drivers\\Imagick\\Modifiers\\DrawLineModifier, unable to build ImagickDraw object\" thrown in Intervention/image.","triggerScenarios":"Thrown at src/Drivers/Imagick/Modifiers/DrawLineModifier.php:66 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the line has valid start and end Point objects with numeric coordinates","Check that the stroke color and stroke width passed to the line are valid (width >= 0, parseable color)","Verify the imagick extension can instantiate \\ImagickDraw (extension loaded, version compatible)"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5598b9e39751c34afc5cdee84abef77f92c26f68","analyzedAt":"2026-08-23T02:17:31.068Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}