SDWebImage / SDWebImage/SDWebImageWebPCoder

Low compression quality compared to cwebp CLI tool

オープン
#116 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Objective-C
スター
277
フォーク
101
PR マージ指標
30日以内にマージされた PR はありません

説明

Description

When using SDImageWebPCoder to encode images with lossless options, the resulting file size and compression quality appear to be worse compared to Google's cwebp command-line tool. Despite both using lossless compression settings, SDImageWebPCoder produces slightly lower quality images, with visible artifacts and banding on gradients and shadows.

I experimented with different encoding options such as: encodeCompressionQuality, encodeWebPMethod, encodeWebPPass etc. Despite these adjustments, the output quality and file size were still worse compared to cwebp -lossless. This suggests a fundamental difference in how the WebP encoding is implemented in SDImageWebPCoder versus the official WebP compression tool.

Code

SDImageWebPCoder:

if let data = SDImageWebPCoder.shared.encodedData(with: nsImage, format: .webP, options: [.encodeWebPLossless: 1]) {
  try data.write(to: destination))
}

cwebp:

cwebp -lossless input.png -o output.webp
Results

Image

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

レポートに示されている SDImageWebPCoder のロスレスエンコードのエントリーポイントから始め、提供された例を使ってその出力を cwebp -lossless と比較します。どの encodeCompressionQuality、encodeWebPMethod、encodeWebPPass オプションが転送されるかを確認し、cwebp のロスレス品質とファイルサイズの動作と一致するか、または実装の違いを文書化することを完了の条件とします。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
objective-c, swift
領域
computer-graphics
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。