{"record":{"id":"9d50a354948135a0","repo":"DrKLO/Telegram","slug":"s-invalid-argument-for-dct","errorCode":null,"errorMessage":"%s: invalid argument for dct\n","messagePattern":"(.+?): invalid argument for dct\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"TMessagesProj/jni/mozjpeg/cjpeg.c","lineNumber":336,"sourceCode":"      /* Disable multiple scans */\n      simple_progressive = FALSE;\n      cinfo->num_scans = 0;\n      cinfo->scan_info = NULL;\n\n    } else if (keymatch(arg, \"dct\", 2)) {\n      /* Select DCT algorithm. */\n      if (++argn >= argc) {      /* advance to next argument */\n        fprintf(stderr, \"%s: missing argument for dct\\n\", progname);\n        usage();\n      }\n      if (keymatch(argv[argn], \"int\", 1)) {\n        cinfo->dct_method = JDCT_ISLOW;\n      } else if (keymatch(argv[argn], \"fast\", 2)) {\n        cinfo->dct_method = JDCT_IFAST;\n      } else if (keymatch(argv[argn], \"float\", 2)) {\n        cinfo->dct_method = JDCT_FLOAT;\n      } else {\n        fprintf(stderr, \"%s: invalid argument for dct\\n\", progname);\n        usage();\n      }\n\n    } else if (keymatch(arg, \"debug\", 1) || keymatch(arg, \"verbose\", 1)) {\n      /* Enable debug printouts. */\n      /* On first -d, print version identification */\n      static boolean printed_version = FALSE;\n\n      if (!printed_version) {\n        fprintf(stderr, \"%s version %s (build %s)\\n\",\n                PACKAGE_NAME, VERSION, BUILD);\n        fprintf(stderr, \"%s\\n\\n\", JCOPYRIGHT);\n        fprintf(stderr, \"Emulating The Independent JPEG Group's software, version %s\\n\\n\",\n                JVERSION);\n        printed_version = TRUE;\n      }\n      cinfo->err->trace_level++;\n","sourceCodeStart":318,"sourceCodeEnd":354,"githubUrl":"https://github.com/DrKLO/Telegram/blob/45ab8f4308496e1f01026a97fcdb0d58a5274474/TMessagesProj/jni/mozjpeg/cjpeg.c#L318-L354","documentation":"-dct was given a value, but it did not match any of the accepted DCT method names (int, fast, float). cjpeg prints this message and calls usage() which exits. The DCT method enum (JDCT_ISLOW / JDCT_IFAST / JDCT_FLOAT) could not be selected.","triggerScenarios":"Running e.g. `cjpeg -dct slow ...`, `cjpeg -dct ifast ...`, or any typo that does not prefix-match int/fast/float.","commonSituations":"Typos; assuming a method name (like 'slow' or 'default') that cjpeg does not accept; copy-pasting flags from documentation for a different JPEG tool.","solutions":["Use one of the accepted values: int (accurate integer), fast (less accurate integer), or float (floating point).","Run `cjpeg -h` or consult usage() output to confirm valid DCT method names for your build."],"exampleFix":"# before\ncjpeg -dct slow in.ppm > out.jpg\n\n# after\ncjpeg -dct int in.ppm > out.jpg","handlingStrategy":"validation","validationCode":"# Reject DCT method names cjpeg does not accept.\ncase \"$DCT\" in\n  int|fast|float) ;;\n  *) echo \"invalid DCT: $DCT (need int|fast|float)\" >&2; exit 2 ;;\nesac\ncjpeg -dct \"$DCT\" in.ppm > out.jpg","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Restrict the -dct value to int, fast, or float.","Check `cjpeg -h` for the method names accepted by your build."],"tags":["mozjpeg","cjpeg","cli","argument","jpeg"],"backgroundTag":null,"analyzedSha":"45ab8f4308496e1f01026a97fcdb0d58a5274474","analyzedAt":"2026-08-14T05:19:30.815Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}