{"record":{"id":"57252f90afdfff63","repo":"slint-ui/slint","slug":"the-image-cannot-be-rendered","errorCode":null,"errorMessage":"The image cannot be rendered","messagePattern":"The image cannot be rendered","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/renderers/software/lib.rs","lineNumber":2432,"sourceCode":"                                        buf_size.height / orig.height,\n                                    )\n                                    .round()\n                                    .cast(),\n                            ),\n                        },\n                        colorize: (colorize.alpha() > 0).then_some(colorize),\n                        alpha,\n                        dst_x: target_rect.origin.x as _,\n                        dst_y: target_rect.origin.y as _,\n                        dst_width: target_rect.size.width as _,\n                        dst_height: target_rect.size.height as _,\n                        rotation: self.rotation.orientation,\n                        tiling,\n                    };\n\n                    self.processor.process_target_texture(&t, clipped_target.cast());\n                } else {\n                    unimplemented!(\"The image cannot be rendered\")\n                }\n            }\n        };\n    }\n\n    fn draw_text_paragraph<Font>(\n        &mut self,\n        paragraph: &TextParagraphLayout<'_, Font>,\n        physical_clip: euclid::Rect<f32, PhysicalPx>,\n        offset: euclid::Vector2D<f32, PhysicalPx>,\n        color: Color,\n        selection: Option<SelectionInfo>,\n    ) where\n        Font: AbstractFont\n            + i_slint_core::textlayout::TextShaper<Length = PhysicalLength>\n            + GlyphRenderer,\n    {\n        let slint_context = self.window.context();","sourceCodeStart":2414,"sourceCodeEnd":2450,"githubUrl":"https://github.com/slint-ui/slint/blob/3a7e700487dc74d404cad0726378053ab763d4e0/internal/renderers/software/lib.rs#L2414-L2450","documentation":"The software renderer's texture/image drawing path only supports image types it can process through its texture processor (scaled/rotated/tilted raster images). When the image kind does not correspond to a processable texture (e.g. certain embedded or special image representations), it panics with this message.","triggerScenarios":"Rendering an image with the `renderer-software` backend where the image cache yields a texture variant that the draw path does not recognize as processable — e.g. an image format the software pipeline cannot handle, or an unsupported tiling/rotation combination with that image kind.","commonSituations":"Embedded no-std targets using the software renderer displaying an image type not supported by the CPU pipeline; images loaded via mechanisms that bypass the normal decoded-image path (e.g. raw borrowed buffers the software renderer cannot consume).","solutions":["Use a standard decoded image format (e.g. PNG/JPEG decoded via the image feature) instead of the unsupported representation","Enable the appropriate image-decoding feature flags of the slint crate so the image is converted to a renderable texture","Simplify image properties (tiling/rotation) that may push the image down the unsupported path, or render with femtovg/skia instead"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// Prefer decoded images the software renderer can handle\nlet img = image::load_from_memory(bytes)?; // decode on host instead of opaque handles","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Enable the image-decoding features of the slint crate so images become renderable textures","Test every image type your UI uses against the software renderer on target hardware","Avoid raw/borrowed buffer image kinds on the software backend"],"tags":["software-renderer","images","embedded"],"backgroundTag":"unsupported-operation","analyzedSha":"3a7e700487dc74d404cad0726378053ab763d4e0","analyzedAt":"2026-09-16T01:37:20.251Z","contentChangedAt":"2026-09-16T01:37:20.251Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}