pngdec: Fix 16bit RGB images display
authorPiotr Brzeziński <piotr@centricular.com>
Thu, 1 Jun 2023 14:21:47 +0000 (16:21 +0200)
committerTim-Philipp Müller <tim@centricular.com>
Fri, 2 Jun 2023 09:51:17 +0000 (10:51 +0100)
commitf44a18ee97838b42d65a80f2d4145ed8cc719f0f
tree002a25f3ecb08f26847572da97afafe364bd8303
parentda024361937704db99a515f375ed706461d17a87
pngdec: Fix 16bit RGB images display

Due to the alpha value being inserted with _BEFORE, we were ending up
with ARGB instead of RGBA, thus displaying completely wrong colours.
According to libpng's manual, "to add an opaque alpha channel, use filler=0xff
or 0xffff and PNG_FILLER_AFTER which will generate RGBA pixels".

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4759>
subprojects/gst-plugins-good/ext/libpng/gstpngdec.c