【问题标题】:What's the practical differences between imagick::INTERLACE_JPEG/INTERLACE_PLANE/INTERLACE_LINE?imagick::INTERLACE_JPEG/INTERLACE_PLANE/INTERLACE_LINE 之间的实际区别是什么?
【发布时间】:2016-04-05 11:07:04
【问题描述】:

ImageMagick 中有许多“隔行扫描”选项,但我不太明白其中的区别。标题中的所有选项似乎都生成了一个可比较的 JPG 文件 - 如果我的连接速度较慢/受限制,我可能会发现差异。

有什么实际区别吗?应该选择一个而不是另一个?

谢谢

【问题讨论】:

    标签: php imagemagick imagick


    【解决方案1】:

    没有区别。这是ImageMagick的jpeg中的相关代码 编码器:

    #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
    

    也就是说,如果支持渐进式 JPEG 并且隔行扫描不是 NoInterlace,那么无论您请求哪种类型的隔行扫描,它都会编写一个渐进式 JPEG。正如您在引用代码的第二行中看到的那样,您还可以使用“PJPEG”扩展名或“PJPEG”格式请求渐进式输出。

    【讨论】:

      猜你喜欢
      • 2023-03-08
      • 2021-06-12
      • 1970-01-01
      • 2010-10-22
      • 2015-01-15
      • 1970-01-01
      • 2012-05-08
      • 2011-03-06
      • 2020-02-16
      相关资源
      最近更新 更多