{"record":{"id":"f0d9e08118b4cadd","repo":"bevyengine/bevy","slug":"incompatible-sizes-old-old-new-new","errorCode":null,"errorMessage":"incompatible sizes: old = {old:?} new = {new:?}","messagePattern":"incompatible sizes: old = (.+?) new = (.+?)","errorType":"exception","errorClass":"TextureReinterpretationError","httpStatus":null,"severity":"error","filePath":"crates/bevy_image/src/image.rs","lineNumber":2219,"sourceCode":"    /// The pixel volumes of the original and reinterpreted extents were different.\n    #[error(\"incompatible sizes: old = {old:?} new = {new:?}\")]\n    IncompatibleSizes {\n        /// The original image extent.\n        old: Extent3d,\n        /// The desired reinterpreted extent.\n        new: Extent3d,\n    },\n    /// The image was expected to be 2d.\n    #[error(\"must be a 2d image\")]\n    WrongDimension,\n    /// In a texture 2d array, there needs to be at least 2 layers or else a render validation error\n    /// will be throw.\n    #[error(\"Rows * Columns must be > 1\")]\n    NotEnoughLayers,\n    /// The image was expected to have a single layer.\n    #[error(\"must not already be a layered image\")]\n    InvalidLayerCount,\n    /// The stacked image could not be evenly divided into the desired number of image layers.\n    #[error(\"can not evenly divide height = {height} by layers = {layers}\")]\n    HeightNotDivisibleByLayers {\n        /// The total image height in pixels.\n        height: u32,\n        /// The desired number of image layers.\n        layers: u32,\n    },\n    /// The grid height is not divisible by the number of tiles in the height.\n    #[error(\"can not evenly divide grid with height = {height} by tiles = {tile_count_y}\")]\n    GridHeightNotDivisibleByTileHeight {\n        /// The total image height in pixels.\n        height: u32,\n        /// The desired number of image layers.\n        tile_count_y: u32,\n    },\n    /// The grid width is not divisible by the number of tiles in the width.\n    #[error(\"can not evenly divide grid with width = {width} by tiles = {tile_count_x}\")]\n    GridWidthNotDivisibleByTileWidth {","sourceCodeStart":2201,"sourceCodeEnd":2237,"githubUrl":"https://github.com/bevyengine/bevy/blob/8d743eb7dc7fcff57a7d5744d0bbf89620b1b145/crates/bevy_image/src/image.rs#L2201-L2237","documentation":"TextureReinterpretationError::IncompatibleSizes: reinterpreting the image to new dimensions failed because the original and requested extents contain different numbers of pixels — reinterpretation requires identical total pixel volume.","triggerScenarios":"Thrown at crates/bevy_image/src/image.rs:2202 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Choose new dimensions with the same width*height*depth product as the original","Resample/resize the image instead of reinterpreting when volume must change","Validate extents before calling reinterpret methods"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8d743eb7dc7fcff57a7d5744d0bbf89620b1b145","analyzedAt":"2026-08-20T16:12:39.808Z","contentChangedAt":"2026-08-20T16:12:39.808Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}