GNOME Bugzilla – Bug 651294
WBMP images are not supported by typefind
Last modified: 2011-06-15 17:42:44 UTC
The WBMP image format is supported by the gdkpixbufdec plugin, but typefind does not currently support WBMP files. As far as I can see, typefind must support WBMP before decodebin2 can successfully decode this filetype.
Created attachment 188785 [details] [review] proposed patch to fix the issue
Created attachment 188786 [details] [review] patch that adds a description of this file type
Comment on attachment 188785 [details] [review] proposed patch to fix the issue >+ TYPE_FIND_REGISTER_START_WITH (plugin, "image/vnd.wap.wbmp", >+ GST_RANK_SECONDARY, wbmp_exts, "\000\000", 2, >+ GST_TYPE_FIND_LIKELY); Every file with two zero bytes at the beginning is likely to be a wbmp file? :-)
(In reply to comment #3) > (From update of attachment 188785 [details] [review]) > >+ TYPE_FIND_REGISTER_START_WITH (plugin, "image/vnd.wap.wbmp", > >+ GST_RANK_SECONDARY, wbmp_exts, "\000\000", 2, > >+ GST_TYPE_FIND_LIKELY); > > Every file with two zero bytes at the beginning is likely to be a wbmp file? > :-) Of course not :-) I assume that using the TYPE_FIND_REGISTER macro would be more appropriate in this case?
yes.
I wouldn't recommend taking the existence of the wbmp image loader as a sign of any level of 'support'. It is barely functional, and the image format is pretty fringe.
Adding a reliable typefinder for wbmp will be almost impossible, the header only contains the 2 zero-bytes and the width/height of the image.
Created attachment 189052 [details] [review] typefinding: add typefinder for WAP WBMP bitmaps > Adding a reliable typefinder for wbmp will be almost > impossible, the header only contains the 2 zero-bytes > and the width/height of the image. True, though this patch seems to work well enough. Not sure how 'reliable' it has to be. If it's plausible enough and no other typefinder claims it, we may just as well go for it. Worst case scenario is that the user gets to see an image with random black and white snow. gdkpixbufdec doesn't actually seem to decode it though (might be a problem in the plugin, however).
Added the rudimentary typefinder nevertheless, mostly just "because we can": commit a9a85bbac1c6bf6807a8ef7280336e339d70d006 Author: Patrick McCarty <patrick.mccarty@intel.com> Date: Fri May 27 14:41:39 2011 -0700 pbutils: add description for wbmp images. https://bugzilla.gnome.org/show_bug.cgi?id=651294 commit d10a7b439b1dfe84be0c3c4f3e8823ceac002765 Author: Tim-Philipp Müller <tim.muller@collabora.co.uk> Date: Thu Jun 2 00:55:41 2011 +0100 typefinding: add typefinder for WAP WBMP bitmaps https://bugzilla.gnome.org/show_bug.cgi?id=651294