Google Groups จะไม่รองรับโพสต์หรือการสมัครสมาชิก Usenet ใหม่อีกต่อไป โดยคุณจะยังคงดูเนื้อหาเดิมได้อยู่

XUL, image & buffer

ยอดดู 27 ครั้ง
ข้ามไปที่ข้อความที่ยังไม่อ่านรายการแรก

cyril

ยังไม่อ่าน,
8 ต.ค. 2549 13:39:198/10/49
ถึง
Hi,

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.

Nickolay Ponomarev

ยังไม่อ่าน,
8 ต.ค. 2549 15:59:368/10/49
ถึง cyril, dev-te...@lists.mozilla.org
On 8 Oct 2006 10:39:19 -0700, cyril <cyril.g...@gmail.com> wrote:
> Hi,
>
> 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.
> [..]

> Why there isn't an image object which can be controled from XPCOM ? Is
> there any plan ?

There's <html:canvas>:
http://developer.mozilla.org/en/docs/Category:HTML:Canvas

Nickolay

cyril

ยังไม่อ่าน,
8 ต.ค. 2549 16:53:578/10/49
ถึง

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 Ponomarev

ยังไม่อ่าน,
8 ต.ค. 2549 18:11:598/10/49
ถึง cyril, dev-te...@lists.mozilla.org
You won't be able to do per-pixel manipulations in JS at high speed.
You'll need to write a plugin in C++. I'd expect drawing other images
to be fast though.

Nickolay

cyril

ยังไม่อ่าน,
8 ต.ค. 2549 18:18:108/10/49
ถึง

> You won't be able to do per-pixel manipulations in JS at high speed.
> You'll need to write a plugin in C++. I'd expect drawing other images
> to be fast though.

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 Ponomarev

ยังไม่อ่าน,
8 ต.ค. 2549 19:34:448/10/49
ถึง cyril, dev-te...@lists.mozilla.org
You could try creating a few image elements and showing them in sequence.

Nickolay

Tei

ยังไม่อ่าน,
9 ต.ค. 2549 07:22:269/10/49
ถึง dev-te...@lists.mozilla.org
On 8 Oct 2006 13:53:57 -0700, cyril <cyril.g...@gmail.com> wrote:

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.

cyril

ยังไม่อ่าน,
9 ต.ค. 2549 11:39:319/10/49
ถึง

> Whats about <image/> native xul tag?
xul:image = xhtml:image, no ?

> 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.

Tei

ยังไม่อ่าน,
9 ต.ค. 2549 12:42:419/10/49
ถึง dev-te...@lists.mozilla.org
On 9 Oct 2006 08:39:31 -0700, cyril <cyril.g...@gmail.com> wrote:
>
> > Whats about <image/> native xul tag?
> xul:image = xhtml:image, no ?
>

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.

cyril

ยังไม่อ่าน,
9 ต.ค. 2549 14:29:449/10/49
ถึง

> 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.

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.

ข้อความใหม่ 0 รายการ