The alpha pre-multiplication was applied to an aggregate value an not to the color value. This could cause wrong colors for images with an alpha channel.
Fixes #47.
These image types use premultiplied alpha values which are also used during the interpolation. If we'd use NRGBA, NRGBA64 as output, we'd have to reverse the premultiplication.
Fixes issue #31.
The color value of every pixel of the resized image is created from the YCbCr
colors of the input image. Therefore each of the three components have the same
sample rate. This is the 4:4:4 chroma subsampling and the output images are
now created accordingly.
Colors in image.RGBA, image.RGBA64 and generic types with alpha channel should
now resize correctly. There's a small performance hit for these image types even
if they don't use alpha channels though.
Fixes bug #26.
This adds optimized access to image.NRGBA, image.NRGBA64 types. Internally these
image types are now preferred as they are easier to handle if alpha channels are
used.
This change sets the number of spawned goroutines to the GOMAXPROCS
value set by the user.
Using more goroutines than available execution threads is slightly
detrimental to performance (~0.5%), and prevents users of the library
from controlling the number of spawned goroutines.
Update benchmarks to focus on conversion performance.
Benchmark each interpolation function for RGBA and YCbCr images.
Reduce the image size used when benchmarking to reduce the influence of
memory performance on results.