{"record":{"id":"644f2023bc69ff07","repo":"Yalantis/uCrop","slug":"cimg-invalid-specified-axes-order-s","errorCode":null,"errorMessage":"CImg(): Invalid specified axes order '%s'.","messagePattern":"CImg\\(\\): Invalid specified axes order '(.+?)'\\.","errorType":"exception","errorClass":"CImgArgumentException","httpStatus":null,"severity":"error","filePath":"ucrop/src/main/jni/CImg.h","lineNumber":13356,"sourceCode":"            case 0x1302 : inv_order = \"zxcy\"; s0 = size_y; s1 = size_c; s2 = size_x; s3 = size_z; break; // ycxz\n            case 0x1320 : inv_order = \"cxzy\"; s0 = size_y; s1 = size_c; s2 = size_z; s3 = size_x; break; // yczx\n            case 0x2013 : inv_order = \"yzxc\"; s0 = size_z; s1 = size_x; s2 = size_y; s3 = size_c; break; // zxyc\n            case 0x2031 : inv_order = \"ycxz\"; s0 = size_z; s1 = size_x; s2 = size_c; s3 = size_y; break; // zxcy\n            case 0x2103 : inv_order = \"zyxc\"; s0 = size_z; s1 = size_y; s2 = size_x; s3 = size_c; break; // zyxc\n            case 0x2130 : inv_order = \"cyxz\"; s0 = size_z; s1 = size_y; s2 = size_c; s3 = size_x; break; // zycx\n            case 0x2301 : inv_order = \"zcxy\"; s0 = size_z; s1 = size_c; s2 = size_x; s3 = size_y; break; // zcxy\n            case 0x2310 : inv_order = \"czxy\"; s0 = size_z; s1 = size_c; s2 = size_y; s3 = size_x; break; // zcyx\n            case 0x3012 : inv_order = \"yzcx\"; s0 = size_c; s1 = size_x; s2 = size_y; s3 = size_z; break; // cxyz\n            case 0x3021 : inv_order = \"yczx\"; s0 = size_c; s1 = size_x; s2 = size_z; s3 = size_y; break; // cxzy\n            case 0x3102 : inv_order = \"zycx\"; s0 = size_c; s1 = size_y; s2 = size_x; s3 = size_z; break; // cyxz\n            case 0x3120 : inv_order = \"cyzx\"; s0 = size_c; s1 = size_y; s2 = size_z; s3 = size_x; break; // cyzx\n            case 0x3201 : inv_order = \"zcyx\"; s0 = size_c; s1 = size_z; s2 = size_x; s3 = size_y; break; // czxy\n            case 0x3210 : inv_order = \"czyx\"; s0 = size_c; s1 = size_z; s2 = size_y; s3 = size_x; break; // czyx\n          }\n          CImg<t>(values,s0,s1,s2,s3,true).get_permute_axes(inv_order).move_to(*this);\n        } else {\n          _width = _height = _depth = _spectrum = 0; _data = 0;\n          throw CImgArgumentException(_cimg_instance\n                                      \"CImg(): Invalid specified axes order '%s'.\",\n                                      cimg_instance,\n                                      axes_order);\n        }\n      } else { _width = _height = _depth = _spectrum = 0; _is_shared = false; _data = 0; }\n    }\n\n    //! Construct image from reading an image file.\n    /**\n       Construct a new image instance with pixels of type \\c T, and initialize pixel values with the data read from\n       an image file.\n       \\param filename Filename, as a C-string.\n       \\note\n       - Similar to CImg(unsigned int,unsigned int,unsigned int,unsigned int), but it reads the image\n         dimensions and pixel values from the specified image file.\n       - The recognition of the image file format by %CImg higlhy depends on the tools installed on your system\n         and on the external libraries you used to link your code against.\n       - Considered pixel type \\c T should better fit the file format specification, or data loss may occur during","sourceCodeStart":13338,"sourceCodeEnd":13374,"githubUrl":"https://github.com/Yalantis/uCrop/blob/f788b534b48c144edf786c8cddbf0e029e637804/ucrop/src/main/jni/CImg.h#L13338-L13374","documentation":"Guard in the axes-permuting CImg constructor: the 'order' string must contain exactly the four characters x,y,z,c in some permutation (matched via a packed 4-char code switch); any other character, a repeated axis, or a wrong-length string falls through to this exception naming the invalid order string.","triggerScenarios":"Thrown at ucrop/src/main/jni/CImg.h:13356 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a 4-character string that is a permutation of 'x','y','z','c', e.g. \"xyzc\", \"yzxc\", or \"czxy\"","Check for typos or extra characters in the order argument at the call site"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f788b534b48c144edf786c8cddbf0e029e637804","analyzedAt":"2026-09-08T08:36:04.887Z","contentChangedAt":"2026-09-08T08:36:04.887Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}