6

There's many "interlace" options in ImageMagick, but I don't really understand the difference. All of the options in the title appear to generate a comparable JPG file - maybe if I had a slower/throttled connection I could discern a difference.

Is there any practical difference? Should one be chosen over the other?

Thanks

Codemonkey
  • 4,455
  • 5
  • 44
  • 76

1 Answers1

8

There's no difference. Here is the relevant code in ImageMagick's jpeg encoder:

#if (JPEG_LIB_VERSION >= 61) && defined(C_PROGRESSIVE_SUPPORTED)
  if ((LocaleCompare(image_info->magick,"PJPEG") == 0) ||
      (image_info->interlace != NoInterlace))
    {
      if (image->debug != MagickFalse)
        (void) LogMagickEvent(CoderEvent,GetMagickModule(),
          "Interlace: progressive");
      jpeg_simple_progression(&jpeg_info);
    }
  else
    if (image->debug != MagickFalse)
      (void) LogMagickEvent(CoderEvent,GetMagickModule(),
        "Interlace: non-progressive");
#else
  if (image->debug != MagickFalse)
    (void) LogMagickEvent(CoderEvent,GetMagickModule(),
      "Interlace: nonprogressive");
#endif

That is, if progressive JPEG is supported and interlace is not NoInterlace, it'll write a progressive JPEG, no matter what flavor of interlacing you request. As you can see in the second line of the quoted code, you can also request progressive output by using the "PJPEG" extension or "PJPEG" format.

Glenn Randers-Pehrson
  • 11,940
  • 3
  • 37
  • 61