|
Post by account_disabled on Dec 10, 2023 21:08:29 GMT -8
使用无损压缩的优点在于保持质量: 与所有其他算法相比,无损压缩可以最大程度地保留图像质量。 无损压缩非常适合存档用途。例如,摄影师可以平衡存储资源与保留最多数据的图像。 无损是视觉艺术的首选压缩算法:摄影、平面设计、数字艺术等。通过将无损算法与正确的深度和分辨率相结合,您几乎可以获得“一对一”的副本。 然而,关于无损压缩如何服务于特定领域,需要注意一件事:应用范围很小。这降低了其整体可用性。 以下是反对无损压缩的其他一些值得考虑的要点: 如果网站使用大量图像,无损压缩可能不是显示它们的最佳选择。这是因为在大多数情况下,您会希望在这些类型的情况下重视较小的文件大小。 尽管压缩可以减小文件大小,但无损算法不会像有损算法那样改变图像数据。因此,您可能只会看到文件大小略有减少,而不是大幅减少。 接下来,我们将研究最快(也可能是最好)的方法来做到这一点。 至此,您就了解了有损压缩和无损压缩之间的区别。 但是您可能仍然不知道哪种算法 电话号码清单 最适合在您的网站上使用。 有两种情况需要考虑: 对于大多数 Web 使用案例,有损压缩是可以接受的。 如果您想查看照片或其他艺术作品,无损压缩是理想的选择。 这些注意事项基于使用一种标准 Web 图像格式,例如 JPEG、PNG 或 GIF。但是,对于 HEIC 和 WebP 等更现代的格式,您的压缩需求可能会有所不同。 我们甚至可以说,除非您在网站上展示专业摄影作品,否则默认情况下有损压缩就可以了。WordPress默认压缩图像,这证明有损压缩几乎适合所有用途。 在网站上显示图像之前,有多种方法可以压缩图像。例如,您可以选择在编辑时应用压缩。然而,这可能是从 RAW 格式转换的副产品。 一些高级主机(例如 Kinsta)甚至提供内置服务,可以帮助您自动优化图像文件。Kinsta 的图像优化功能对所有客户免费,可创建图像的WebP 版本,然后使用 Kinsta 的闪电般快速的 CDN向访问者提供较小的图像。您可以选择有损和无损压缩,并根据需要激活或停用该功能。 然而,除了集成工具之外,一个非常流行的选择是使用众多在线服务之一。 它们中的每一个都将提供一系列算法和示例性用户界面 (UI)。此外,大多数都提供免费服务,这至少让您有机会在提交之前试用该应用程序。 我们在图像优化文章中讨论了其中一些选项,尽管这些是连接到应用程序编程接口 (API) 的 WordPress 特定插件。好消息是,许多插件还提供在线界面。例如,考虑ShortPixel: ShortPixel 主页的座右铭是“在线图像压缩和优化” ShortPixel 接口。 在这里,将图像拖到上传器,然后确保应用程序压缩并处理它们。首先选择算法,因为该过程将立即开始。 选择很简单:两种形式的有损压缩(“有损”和“光泽”)和无损选项。ShortPixel 的界面很好地解释了每种算法之间的差异,您可以在几秒钟内下载图像。 虽然两者都能满足您的需求,但Imagify 的界面看起来比 ShortPixel 更优雅、更专业。这里还有三个“压缩级别”:正常、激进和超级。 具有三级压缩的 Imagify 界面 Imagify 界面。 这里的细微差别是,Imagify 从无损压缩开始,并通过一些相当繁重的操作逐步升级为有损算法。但是,还有一些其他解决方案中找不到的其他选项。 对于初学者来说,您可以保持图像的 EXIF 数据完整,甚至可以在转换后调整其大小。
|
|