DescriptionSupport decoding PNG to 565.
Although we initially discussed not supporting 565, SkCodec needs to
support Android's BitmapFactory and BitmapRegionDecoder, which need to
support 565.
We could instead implement 565 on top of SkCodec, but this would require
more memory and run more slowly.
An open question is whether to support dithering, and how. In order to
support dithering, we need to pass y to RowProc, which I believe means
we will need to pass y to SkSwizzler::swizzle().
I dislike having an option which is typically ignored - SkImageDecoder
allows you to turn on dithering when decoding to any color type, but it
is only meaningful only if the output color type is 565.
We could also make the client implement dithering, which I believe would
mean forcing them to do the conversion to 565 (since we have already
thrown away data when we convered to 565 without dithering).
BUG=skia:3257
Committed: https://skia.googlesource.com/skia/+/ab60c5bd9f360e9d58f0f34683b92fb841a514b1
Patch Set 1 #
Messages
Total messages: 6 (2 generated)
|