Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Low compression quality compared to cwebp CLI tool

Đang mở
#116 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
objective-c, swift
Lĩnh vực
computer-graphics

Hướng nghiên cứu

Bắt đầu với điểm đầu vào mã hóa không mất dữ liệu của SDImageWebPCoder được nêu trong báo cáo và so sánh đầu ra của nó với cwebp -lossless bằng ví dụ được cung cấp. Kiểm tra các tùy chọn encodeCompressionQuality, encodeWebPMethod và encodeWebPPass nào được chuyển tiếp, sau đó xác định là hoàn tất khi hành vi về chất lượng không mất dữ liệu và kích thước tệp khớp với cwebp hoặc khi khác biệt trong triển khai được ghi lại.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Objective-C
Star
277
Fork
101
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của SDWebImage/SDWebImageWebPCoder

Tất cả issue của SDWebImage/SDWebImageWebPCoder

Issue tương tự

Thêm issue về Objective-C

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.