Low compression quality compared to cwebp CLI tool
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- objective-c, swift
- Domain
- computer-graphics
Research direction
Start with the SDImageWebPCoder lossless encoding entry point shown in the report and compare its output against cwebp -lossless using the provided example. Check which encodeCompressionQuality, encodeWebPMethod, and encodeWebPPass options are forwarded, then define done as matching cwebp's lossless quality and file-size behavior or documenting the implementation difference.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- Objective-C
- Stars
- 277
- Forks
- 101
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from SDWebImage/SDWebImageWebPCoder
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
SDWebImage/SDWebImageWebPCoder#117 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
SDWebImage/SDWebImageWebPCoder#115 · 4 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
SDWebImage/SDWebImageWebPCoder#113 · 3 comments ·
-
Frames loading Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
SDWebImage/SDWebImageWebPCoder#105 · 15 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
SDWebImage/SDWebImageWebPCoder#78 · 2 comments ·
All issues in SDWebImage/SDWebImageWebPCoder
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
noah-nuebling/mac-mouse-fix#2054 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
obsproject/obs-studio#13918 ·