I currently try to show images in a xulrunner application.
I can use <html:image>, <xul:image> or a plugin.
I would like to show a lot of images in a short time to simulate an
animation.
I 'd like to interact with the images : zoom (draw a rectangle), move.
As far as I know, I is not possible to controle <xul:image> at the
buffer level, even with XPCOM.
And a plugin is more difficult to write, to maintain (win32, Unix...).
Is it possible to do what I'd like to do without a plugin ?
Why there isn't an image object which can be controled from XPCOM ? Is
there any plan ?
I think I would be a good thing for the graphical applications world ?
Thanks a lot,
Cyril.
There's <html:canvas>:
http://developer.mozilla.org/en/docs/Category:HTML:Canvas
Nickolay
Yes I know, but <html:canvas> use the same rules concerning the load
and the update of images as <xtml:image>.
And you can't update images at the speed you would like...Even if they
are available.
Some weeks ago, I did some tests and I could show only 2 images a
second in average.
Cyril.
Nickolay
I agree with you.
But imagine you have the images in a local directory.
How would you do to draw these at top speed in mozilla (animation) ?
Cyril.
Nickolay
This raise questions.
Whats about <image/> native xul tag?
Whats about to replace images with css and speed?
Whats about to replace images with "data:image/gif,..." protocol?
Why you need animations? For most uses you can do stuff with GIF
native animation, etc.
Complex stuff can be rendered on the server and downloaded as a png or
something.
> Whats about to replace images with css and speed?
> Whats about to replace images with "data:image/gif,..." protocol?
I tried, and I think gecko decides itself when to update the image.
> Why you need animations? For most uses you can do stuff with GIF
> native animation, etc.
>
> Complex stuff can be rendered on the server and downloaded as a png or
> something.
It 's not a web application.
In fact, images are build in the background (scientific application)
and i'd like to draw them at high speed (wave propagation for
instance).
Cyril.
No idea.
> > Whats about to replace images with css and speed?
> > Whats about to replace images with "data:image/gif,..." protocol?
>
> I tried, and I think gecko decides itself when to update the image.
>
Ok.
>
> > Why you need animations? For most uses you can do stuff with GIF
> > native animation, etc.
> >
> > Complex stuff can be rendered on the server and downloaded as a png or
> > something.
> It 's not a web application.
> In fact, images are build in the background (scientific application)
> and i'd like to draw them at high speed (wave propagation for
> instance).
Humm... Idea!
As other people state. Javascript is slow, so a pixel approach will be
doomed. Maybe you can draw lines, etc with a SVG canvas? Firefox 1.5+
support svg, I think. That is better and faster than perpixel
drawing.
Even game engines nowdays work that way, with texels and not pixels.
Is faster to let the hardware render textures/lines/etc than try to
compute yourself.
Why not ?
But images do already exist in memory.
I thought simply of a guinuine XPCOM FrameBuffer.
I think there is no solution without a plugin :-(
Cyril.