【问题标题】:Can phpthumb generate interlaced images for progressive browser display?phpthumb 可以为渐进式浏览器显示生成交错图像吗?
【发布时间】:2012-10-17 06:00:10
【问题描述】:

是否可以使用 phpthumb 生成交错图像?即使 phpthumb 不生成交错图像,是否有一种安全的方法可用于在使用 phpthumb 进行图像处理的 web 应用上实现这一点?

我试着找出 phpthumb 是否有这个功能,我能想到的只是 phpThumb.config.php 文件中的这个配置指令:

$PHPTHUMB_CONFIG['output_interlace'] = true;   // if true: interlaced output for GIF/PNG, progressive output for JPEG; if false: non-interlaced for GIF/PNG, baseline for JPEG.

我将我的设置为 true,但它仍然没有生成隔行扫描图像。

【问题讨论】:

    标签: php image-processing phpthumb


    【解决方案1】:

    我自己也想知道这个问题,并检查了phpthumb source 看起来像 GD 库,它仅在 (1) 调用 OutputThumbnail() 方法和 (2) 使用 ImageMagick 时执行隔行扫描,ImageMagickThumbnailToGD() 方法。据我所知,当您使用该类并调用 GenerateThumbnail() 时,它不会被调用

    【讨论】:

      【解决方案2】:

      已推送补丁来解决此问题 - 现在,如果启用该设置,OutputThumbnail 和 RenderToFile 都将生成正确隔行扫描的 JPEG (true)

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2020-11-01
        • 2017-07-09
        • 1970-01-01
        • 2011-06-04
        • 1970-01-01
        • 2021-06-13
        • 2012-04-01
        • 2019-09-27
        相关资源
        最近更新 更多