DrKLO/Telegram · error

%s: sorry, progressive output was not compiled in

Error message

%s: sorry, progressive output was not compiled in

What it means

cjpeg was built without progressive-output support (C_PROGRESSIVE_SUPPORTED undefined). The -progressive switch (which enables progressive/multi-scan JPEG output) is therefore unavailable; cjpeg prints this message and exits with EXIT_FAILURE. Progressive support is a compile-time option; baseline-only builds lack it.

Source

Thrown at TMessagesProj/jni/mozjpeg/cjpeg.c:433

              progname);
      exit(EXIT_FAILURE);
#endif

    } else if (keymatch(arg, "outfile", 4)) {
      /* Set output file name. */
      if (++argn >= argc) {      /* advance to next argument */
        fprintf(stderr, "%s: missing argument for outfile\n", progname);
        usage();
      }
      outfilename = argv[argn]; /* save it away for later use */

    } else if (keymatch(arg, "progressive", 1)) {
      /* Select simple progressive mode. */
#ifdef C_PROGRESSIVE_SUPPORTED
      simple_progressive = TRUE;
      /* We must postpone execution until num_components is known. */
#else
      fprintf(stderr, "%s: sorry, progressive output was not compiled in\n",
              progname);
      exit(EXIT_FAILURE);
#endif

    } else if (keymatch(arg, "memdst", 2)) {
      /* Use in-memory destination manager */
#if JPEG_LIB_VERSION >= 80 || defined(MEM_SRCDST_SUPPORTED)
      memdst = TRUE;
#else
      fprintf(stderr, "%s: sorry, in-memory destination manager was not compiled in\n",
              progname);
      exit(EXIT_FAILURE);
#endif

    } else if (keymatch(arg, "quality", 1)) {
      /* Quality ratings (quantization table scaling factors). */
      if (++argn >= argc) {      /* advance to next argument */
        fprintf(stderr, "%s: missing argument for quality\n", progname);

View on GitHub (pinned to 45ab8f4308)

Solutions

  1. Drop -progressive to emit a baseline (single-scan) JPEG.
  2. Rebuild libjpeg/mozjpeg with C_PROGRESSIVE_SUPPORTED (and C_MULTISCAN_FILES_SUPPORTED) defined if progressive output is required.

Example fix

# before
cjpeg -progressive -quality 80 in.ppm > out.jpg

# after
cjpeg -quality 80 in.ppm > out.jpg
Defensive patterns

Strategy: fallback

Validate before calling

# Probe progressive support before using -progressive.
if cjpeg -h 2>&1 | grep -q progressive; then
  PROG=-progressive
else
  PROG=   # fall back to baseline
fi
cjpeg $PROG -quality 80 in.ppm > out.jpg

Prevention

When it happens

Trigger: Invoking `cjpeg -progressive ...` against a mozjpeg/libjpeg build compiled without C_PROGRESSIVE_SUPPORTED.

Common situations: A baseline-only libjpeg build for embedded use; CI using a stripped mozjpeg; scripts assuming progressive is always available.

Related errors


AI-assisted analysis of DrKLO/Telegram@45ab8f4308 (2026-08-14). Data as JSON: /api/errors/f34112f144e317a5. Report an issue: GitHub.