Feedback wanted on Firefox plugin for WebP

274 views
Skip to first unread message

Johan Gustafsson

unread,
Apr 1, 2011, 7:32:34 AM4/1/11
to WebP Discussion
We've developed a plugin to view WebP-images for Firefox and we would
love to get some feedback regarding stability, improvements and
possible bugs etc.

The plugin is available from our Google Code page:
http://code.google.com/p/webp-npapi-linux/

Pascal Massimino

unread,
Apr 3, 2011, 1:20:47 AM4/3/11
to webp-d...@webmproject.org, Johan Gustafsson
Hi Johan,

On Fri, Apr 1, 2011 at 4:32 AM, Johan Gustafsson <p0ps...@gmail.com> wrote:
We've developed a plugin to view WebP-images for Firefox and we would
love to get some feedback regarding stability, improvements and
possible bugs etc.

glad to see this plugin!

Some remarks:
 
* i had to change some "../../include/npapi*" to "xulrunner/include/..." in the code,
since my Gecko-SDK was installed system-wide, and not in ../../
* some compile warnings i got:
g++ `pkg-config --cflags gtk+-2.0` -Wall -DXP_UNIX=1 -DMOZ_X11=1 -fPIC -O2 -c webp-npapi.cpp
webp-npapi.cpp:30: warning: deprecated conversion from string constant to ?char*?
g++ `pkg-config --cflags gtk+-2.0` -Wall -DXP_UNIX=1 -DMOZ_X11=1 -fPIC -O2 -c CPlugin.cpp
CPlugin.cpp: In member function ?void CPlugin::drawWindow(GdkDrawable*)?:
CPlugin.cpp:392: warning: comparison between signed and unsigned integer expressions
CPlugin.cpp:393: warning: comparison between signed and unsigned integer expressions
CPlugin.cpp: In static member function ?static void CPlugin::spawnAbout(GtkMenuItem*, void*)?:
CPlugin.cpp:556: warning: format not a string literal and no format arguments
g++ -Wall -DXP_UNIX=1 -DMOZ_X11=1 -fPIC -O2 -shared -lwebp -L/usr/local/lib webp-npapi.o CPlugin.o -o webp-npapi.so

* note that i added " -L/usr/local/lib", but that's just me.

Afterward, the plugin ran ok, but:
  * the thumbnails of the gallery page (http://code.google.com/speed/webp/gallery.html) didn't show correctly. I get the ALT text instead.
  * when i click on the thumbnail to get the WebP image full-page, they are upscaled to fit the browser's size (e.g.: http://www.gstatic.com/webp/gallery/2.webp)
instead of retaining the original size.

I'm running firefox 3.6.16 on x86_64.

skal

The plugin is available from our Google Code page:
http://code.google.com/p/webp-npapi-linux/

--
You received this message because you are subscribed to the Google Groups "WebP Discussion" group.
To post to this group, send email to webp-d...@webmproject.org.
To unsubscribe from this group, send email to webp-discuss...@webmproject.org.
For more options, visit this group at http://groups.google.com/a/webmproject.org/group/webp-discuss/?hl=en.


Richard Rabbat

unread,
Apr 3, 2011, 11:00:14 AM4/3/11
to webp-d...@webmproject.org, Pascal Massimino, Johan Gustafsson
I think the images need to be embedded in <object> or <embed> tags. I can add a page with such tags. will try it today. thanks for the great work!
--
Richard Rabbat | Product Manager | Google, Inc.
E: rab...@google.com | M: +1-650-714-7618 | Google Voice: +1-617-213-0819

Johan Gustafsson

unread,
Apr 6, 2011, 11:39:51 AM4/6/11
to WebP Discussion
Thanks for the feedback!

The warnings have been ignored during development as we haven't viewed
them too important.
However, we're planning on either scaling the images when viewed full-
page according to the
aspect ratio to fit the browser window. The other alternative is to
render our own scroll-bars
using GTK as Firefox basically just hands us a drawable surface.

We're not too familiar with GTK and there are already bugs in the form
of race-conditions in the code
when saving the image due to how we handle GTK signals, although they
should seldom appear in practical situations.
Because of this we will probably choose to implement scroll-bars later
and just scale the image according to
aspect ratio.

Regarding the second issue. As to our knowledge there does not seem to
be a way for a plugin to handle img-elements.
The plugin is only loaded by Firefox when it encounters embedded data
using object/embed-tags.

It should be possible to rewrite img-tags on-the-fly using an
extension instead, this would then be separate from
the plugin itself.
Reply all
Reply to author
Forward
0 new messages