[gstreamer-bugs] [Bug 164197] New: [pngdec] & [pngenc] The decoded image is in native byte order
bugzilla-daemon at bugzilla.gnome.org
bugzilla-daemon at bugzilla.gnome.org
Sat Jan 15 13:40:11 PST 2005
Please DO NOT reply to this by email. All additional comments should be made in
the comments box of this bug report.
http://bugzilla.gnome.org/show_bug.cgi?id=164197
GStreamer | gst-plugins | Ver: HEAD CVS
Summary: [pngdec] & [pngenc] The decoded image is in native byte
order
Product: GStreamer
Version: HEAD CVS
Platform: Other
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: gst-plugins
AssignedTo: gstreamer-bugs at lists.sourceforge.net
ReportedBy: algernon at bonehunter.rulez.org
QAContact: gstreamer-bugs at lists.sourceforge.net
CC: all-bugs at bugzilla.gnome.org
Get a 32bit (RGBA) image, and run the following command:
gst-launch filesrc blocksize=100000 location=eye.png ! pngdec ! ffmpegcolorspace
! video/x-raw-rgb,bpp=(int)24,depth=(int)24 ! pngenc ! filesink location=eye2.png
The result will have inverted R and B channels. For some reason, inserting an
alphacolor into the pipeline, before ffmpegcolorspace makes the problem go away.
Another interesting thing to note, is that when launched like this, pngdec's
srcpad will fixate to bpp=24,depth=24, which is bogus, as the image is
bpp=32,depth=32. That's another bug, though. (Why the image does not get
horribly distorted by this, is beyond me)
As for the fix... Most probably the red_mask and blue_mask properties of
pngdec's source pad should be exchanged, when neccessary. Question is, how do I
change those, and how do I detect I need to? (fortunately, PNG is always in
network byte order)
Another option is to use png_set_bgr(pngdec->png) on little-endian systems, so
libpng does not perform the MSB->LSB conversion itself, and the default values
for red_mask and green_mask are ok. I'll look into libpng, if there is a way to
tell it that it should not modify the byte order at all.. That would be best.
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are the QA contact for the bug.
More information about the Gstreamer-bugs
mailing list