SDWebImage / SDWebImageAVIFCoder

A SDWebImage coder plugin to support AVIF(AV1 Image File Format) image
MIT License
55 stars 14 forks source link

Scale alpha planes [0, (1 << bit-depth) - 1] to [0, 65536] #14

Closed ledyba-z closed 4 years ago

ledyba-z commented 4 years ago

I found that I forgot to scale alpha planes.

In 10bit and 12bit images, alpha plane contains values which ranged from 0 to 1023(10bit) or 4095(12bit).

In this PR, I scale them to 0 to 65535.

ledyba-z commented 4 years ago

Thanks!

codecov[bot] commented 4 years ago

Codecov Report

Merging #14 into master will decrease coverage by 0.1%. The diff coverage is 83.72%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #14      +/-   ##
==========================================
- Coverage   86.19%   86.09%   -0.11%     
==========================================
  Files           4        4              
  Lines         971     1014      +43     
==========================================
+ Hits          837      873      +36     
- Misses        134      141       +7
Impacted Files Coverage Δ
SDWebImageAVIFCoder/Classes/SDImageAVIFCoder.m 86.47% <83.72%> (-0.13%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 62c8e95...4713673. Read the comment docs.