{"record":{"id":"1c976bf0e7b3f25c","repo":"DrKLO/Telegram","slug":"1-jpeg-quality-value-0-100-n","errorCode":null,"errorMessage":"1. JPEG quality value, 0-100\\n","messagePattern":"1\\. JPEG quality value, 0-100\\\\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"TMessagesProj/jni/mozjpeg/yuvjpeg.c","lineNumber":118,"sourceCode":"  int frame_height;\n  const char *yuv_path;\n  const char *jpg_path;\n  FILE *yuv_fd;\n  size_t yuv_size;\n  unsigned char *yuv_buffer;\n  JSAMPLE *jpg_buffer;\n  struct jpeg_compress_struct cinfo;\n  struct jpeg_error_mgr jerr;\n  FILE *jpg_fd;\n  JSAMPROW yrow_pointer[16];\n  JSAMPROW cbrow_pointer[8];\n  JSAMPROW crrow_pointer[8];\n  JSAMPROW *plane_pointer[3];\n  int y;\n\n  if (argc != 5) {\n    fprintf(stderr, \"Required arguments:\\n\");\n    fprintf(stderr, \"1. JPEG quality value, 0-100\\n\");\n    fprintf(stderr, \"2. Image size (e.g. '512x512')\\n\");\n    fprintf(stderr, \"3. Path to YUV input file\\n\");\n    fprintf(stderr, \"4. Path to JPG output file\\n\");\n    return 1;\n  }\n\n  errno = 0;\n\n  quality = strtol(argv[1], NULL, 10);\n  if (errno != 0 || quality < 0 || quality > 100) {\n    fprintf(stderr, \"Invalid JPEG quality value!\\n\");\n    return 1;\n  }\n\n  matches = sscanf(argv[2], \"%dx%d\", &luma_width, &luma_height);\n  if (matches != 2) {\n    fprintf(stderr, \"Invalid image size input!\\n\");\n    return 1;","sourceCodeStart":100,"sourceCodeEnd":136,"githubUrl":"https://github.com/DrKLO/Telegram/blob/45ab8f4308496e1f01026a97fcdb0d58a5274474/TMessagesProj/jni/mozjpeg/yuvjpeg.c#L100-L136","documentation":"This is the first descriptive line of yuvjpeg's usage block, printed to stderr as part of the argc != 5 error path: `1. JPEG quality value, 0-100`. It documents argument #1. It is not raised independently; it always follows the `Required arguments:` header (error 191) and precedes lines 193/194.","triggerScenarios":"Same as 191: any invocation of yuvjpeg with argc != 5 triggers the whole usage block including this line.","commonSituations":"Misunderstanding the required argument order; this line tells the user argument 1 must be a quality value in [0,100].","solutions":["Supply a quality argument (integer 0-100) as the first parameter.","Re-read the full usage block (lines 117-120) to construct the correct command.","Validate argument count and types before invoking."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"/* ensure argument 1 is an integer quality in [0,100] before invoking */\nint q = atoi(argv[1]);\nif (q < 0 || q > 100) { /* report and do not invoke yuvjpeg */ }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate argument count and the quality value before invoking yuvjpeg.","Treat the usage block as the contract: quality first, size second, YUV in third, JPG out fourth."],"tags":["cli","jpeg","mozjpeg","yuvjpeg","usage","documentation"],"backgroundTag":null,"analyzedSha":"45ab8f4308496e1f01026a97fcdb0d58a5274474","analyzedAt":"2026-08-14T05:19:30.815Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}