GNOME Bugzilla – Bug 163161
[pngenc] only supports video/x-raw-rgb,bits=24,depth=24
Last modified: 2005-01-07 10:27:04 UTC
gst-launch filesrc location=png-with-alpha.png ! pngdec ! pngenc ! filesink location=foo.png This will not work, as pngenc cannot negotiate with pngdec. If I add an ! alphacolor ! ffmpegcolorspace after pngdec, the file gets saved, but is skewed (because - imo - it really is 32bits, but pngenc treats it as if it were 24 only) Looking at ext/libpng/gstpngenc.c, I think I may be able to come up with a patch soonish.
Created attachment 35583 [details] [review] Patch fixing the bug This one add support for video/x-raw-rgb,depth=32 to pngenc. Quite simple, really. First, the patch makes pngenc use a different way to set up its pads (that was needed to add GST_VIDEO_CAPS_RGBA support), then teaches the png_set_iHDR call in gst_pngenc_chain() about PNG_COLOR_TYPE_RGBA.
Applied, thanks. Also renamed mime to image/png, since that's the official one.