{"record":{"id":"73d35ac68f90a519","repo":"DrKLO/Telegram","slug":"s-sorry-image-transformation-was-not-compiled","errorCode":null,"errorMessage":"%s: sorry, image transformation was not compiled\n","messagePattern":"(.+?): sorry, image transformation was not compiled\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"TMessagesProj/jni/mozjpeg/jpegtran.c","lineNumber":123,"sourceCode":"\n\nLOCAL(void)\nselect_transform(JXFORM_CODE transform)\n/* Silly little routine to detect multiple transform options,\n * which we can't handle.\n */\n{\n#if TRANSFORMS_SUPPORTED\n  if (transformoption.transform == JXFORM_NONE ||\n      transformoption.transform == transform) {\n    transformoption.transform = transform;\n  } else {\n    fprintf(stderr, \"%s: can only do one image transformation at a time\\n\",\n            progname);\n    usage();\n  }\n#else\n  fprintf(stderr, \"%s: sorry, image transformation was not compiled\\n\",\n          progname);\n  exit(EXIT_FAILURE);\n#endif\n}\n\n\nLOCAL(int)\nparse_switches(j_compress_ptr cinfo, int argc, char **argv,\n               int last_file_arg_seen, boolean for_real)\n/* Parse optional switches.\n * Returns argv[] index of first file-name argument (== argc if none).\n * Any file names with indexes <= last_file_arg_seen are ignored;\n * they have presumably been processed in a previous iteration.\n * (Pass 0 for last_file_arg_seen on the first or only iteration.)\n * for_real is FALSE on the first (dummy) pass; we may skip any expensive\n * processing.\n */\n{","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/DrKLO/Telegram/blob/45ab8f4308496e1f01026a97fcdb0d58a5274474/TMessagesProj/jni/mozjpeg/jpegtran.c#L105-L141","documentation":"A transform option (e.g. -rotate, -flip, -crop, -transpose) was passed to jpegtran, but the build was compiled without TRANSFORMS_SUPPORTED. The program prints this message and exits with failure; no transformation is possible.","triggerScenarios":"Using a minimal/stripped libjpeg build where the transformation code paths were excluded at compile time via the feature macro. Any -rotate/-flip/-transpose/-transverse/-trim/-crop invocation hits the #else branch.","commonSituations":"Distributing a trimmed mozjpeg/libjpeg-turbo build for size (e.g. decode-only on mobile), or building from a configuration that disabled the transtransform sources. The error is consistent for every transform flag until rebuilt.","solutions":["Rebuild libjpeg-turbo/mozjpeg with -DTRANSFORMS_SUPPORTED=1 (default on for full builds; ensure transupp.c is compiled in).","Use a prebuilt full distribution that includes transformation support.","If transforms cannot be enabled, decode with djpeg, transform in another tool, and re-encode with cjpeg.","Check the build's CMake/Make config for any flag that stripped transupp.c."],"exampleFix":"# before: minimal build, transform disabled\n./jpegtran -rotate 90 in.jpg > out.jpg\n# after: rebuild with transforms enabled\ncmake -DWITH_SIMD=1 ... && make   # TRANSFORMS_SUPPORTED is default-on\n./jpegtran -rotate 90 in.jpg > out.jpg","handlingStrategy":"type-guard","validationCode":null,"typeGuard":"#if defined(__has_include)\n  #include <jmorecfg.h>\n#endif\n/* build-time check */\n#ifndef TRANSFORMS_SUPPORTED\n#error \"this jpegtran cannot do transforms; rebuild with TRANSFORMS_SUPPORTED\"\n#endif","tryCatchPattern":null,"preventionTips":["Compile-time guard your transform code behind #ifdef TRANSFORMS_SUPPORTED.","Ship a full libjpeg-turbo/mozjpeg build if transforms are needed.","Document the build variant in your release notes."],"tags":["jpegtran","transform","build-config","compile-time","mozjpeg"],"backgroundTag":null,"analyzedSha":"45ab8f4308496e1f01026a97fcdb0d58a5274474","analyzedAt":"2026-08-14T05:19:30.815Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}