You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Eric SCHAEFFER <es...@posterconseil.com> on 2000/01/04 11:53:24 UTC

FOP and images - Jimi

Hie,

I've been working on a (personnal) project to create charts. I use Jimi
(http://java.sun.com/products/jimi/) to encode the images, and it works fine
(I began to use JAI, but I wanted my project to work under Windows and Linux
and Linux JAI port isn't ready yet).

I've created a image class in FOP to use Jimi, because it support a lot of
image format (BMP, PNG, TGA, TIFF and others). I need to continue my work
(handling errors, modify FopImageFactory class, etc.), but I'd like to know
if you're interrested in using it.

Jimi runs under java 1.1.x and is very simple, but I don't know if it can be
included in module dependencies (licencing problems). If you know another
library to encode images that is free, let me know...

Eric.


_______________________________________

Eric SCHAEFFER
eschaeffer@posterconseil.com

POSTER CONSEIL
118 rue de Tocqueville
75017 PARIS
FRANCE
Tel. : 33-140541058
Fax : 33-140541059
_______________________________________



Re: FOP and images - Jimi

Posted by Pierpaolo Fumagalli <pi...@apache.org>.
Eric SCHAEFFER wrote:
> 
> Hie,
> 
> I've been working on a (personnal) project to create charts. I use Jimi
> (http://java.sun.com/products/jimi/) to encode the images, and it works fine
> (I began to use JAI, but I wanted my project to work under Windows and Linux
> and Linux JAI port isn't ready yet).
> 
> I've created a image class in FOP to use Jimi, because it support a lot of
> image format (BMP, PNG, TGA, TIFF and others). I need to continue my work
> (handling errors, modify FopImageFactory class, etc.), but I'd like to know
> if you're interrested in using it.
> 
> Jimi runs under java 1.1.x and is very simple, but I don't know if it can be
> included in module dependencies (licencing problems). If you know another
> library to encode images that is free, let me know...

I am interested in such a thing for StyleBook... I need to produce
raster images from XML data, to do all those nice pics that are on our
website (like the sidebar, and the title image). I was looking into JAI,
but I have limited time and resources to work on it.

Have you ever seen stylebook, and how it produces images from XML?

	Pier



Re: FOP and images - Jimi

Posted by Pierpaolo Fumagalli <pi...@apache.org>.
Stefano Mazzocchi wrote:
> 
> Eric SCHAEFFER wrote:
> >
> > Hie,
> >
> > I've been working on a (personnal) project to create charts. I use Jimi
> > (http://java.sun.com/products/jimi/) to encode the images, and it works fine
> > (I began to use JAI, but I wanted my project to work under Windows and Linux
> > and Linux JAI port isn't ready yet).
> 
> Look again. JAI is 100% pure + native speedups for Windows/Solaris. Have
> you tried using it under linux? it works.

Are you 100% sure about that????

	Pier

Re: FOP and images - Jimi

Posted by Pierpaolo Fumagalli <pi...@apache.org>.
Eric SCHAEFFER wrote:
> 
> > Tey the XVFB (X Virtual Frame Buffer) server. It doesn't require a
> > graphic card, but just operates "off screen". I heard that many use it
> > as a way to have Imaging functionality without opening a real X11
> > display!
> >
> 
> Where can I find it ? (I've got the debian dist., but I don't find the
> package). I found 'XF68_FBDev' but I don't know if it's this one (my config
> work now, and I don't want to loose it).

I got the original XFree distribution, and it's called Xvfb.tgz. There's
a readme in the docs called README.fbdev

> However, I've got another problem :
> the jvm (blackdown port, jdk-1.2/i386/pre-v2/gclib2.0 on Debian linux 2.1
> kernel 2.0.36) doesn' seem to be able to connect to the X11 server. I don't
> know why (I'm not a Linux expert).

You need to have the X server UP AND RUNNING always... The virtual
machine doesn't start it. That's why the Virtual FrameBuffer is nice,
because you live it there, without compromising the display :)

	Pier

Re: FOP and images - Jimi

Posted by Eric SCHAEFFER <es...@posterconseil.com>.
----- Original Message -----
From: Pierpaolo Fumagalli <pi...@apache.org>
To: <fo...@xml.apache.org>
Sent: Thursday, January 06, 2000 3:55 PM
Subject: Re: FOP and images - Jimi


> Tey the XVFB (X Virtual Frame Buffer) server. It doesn't require a
> graphic card, but just operates "off screen". I heard that many use it
> as a way to have Imaging functionality without opening a real X11
> display!
>

Where can I find it ? (I've got the debian dist., but I don't find the
package). I found 'XF68_FBDev' but I don't know if it's this one (my config
work now, and I don't want to loose it).

However, I've got another problem :
the jvm (blackdown port, jdk-1.2/i386/pre-v2/gclib2.0 on Debian linux 2.1
kernel 2.0.36) doesn' seem to be able to connect to the X11 server. I don't
know why (I'm not a Linux expert).

If I connect myself in text mod (by telnet), and run a java program to
create an image, it fails with the error

Exception in thread "main" java.lang.InternalError: Can't connect to X11
window server using ':0.0' as the value of the DISPLAY variable.
        at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
        at
sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:61)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Compiled Code)
        at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(Compiled
Code)
        at java.awt.image.BufferedImage.createGraphics(Compiled Code)
        at BaroChart.AbstractBaroChart.<init>(Compiled Code)
        at BaroChart.PieChart.<init>(Compiled Code)
        at BaroChart.BaroChartFactory.Make(Compiled Code)
        at test_pie.main(Compiled Code)

If I start X manualy and then run the same code, it's Ok.

The problem is that, of course, my servlets can't create or load images...

If you have an idea...

Eric.

_______________________________________

Eric SCHAEFFER
eschaeffer@posterconseil.com

POSTER CONSEIL
118 rue de Tocqueville
75017 PARIS
FRANCE
Tel. : 33-140541058
Fax : 33-140541059
_______________________________________



Re: FOP and images - Jimi

Posted by Pierpaolo Fumagalli <pi...@apache.org>.
Pierpaolo Fumagalli wrote:
> 
> Try the XVFB (X Virtual Frame Buffer) server. It doesn't require a
> graphic card, but just operates "off screen". I heard that many use it
> as a way to have Imaging functionality without opening a real X11
> display!

Re: FOP and images - Jimi

Posted by Stefano Mazzocchi <st...@apache.org>.
Pierpaolo Fumagalli wrote:
> 
> Eric SCHAEFFER wrote:
> >
> > Great ! I can't try JAI under Linux for now. I've got a lot of problems
> > installing X11 with my graphic card (Diamond FireGL 1000 Pro), and my JVM
> > (blackdown port) need an X11 server running to open images. As there were
> > binaries in the JAI distribution, and only a distribution for Windows or
> > Solaris, I thought it coudn't run under Linux...
> 
> Tey the XVFB (X Virtual Frame Buffer) server. It doesn't require a
> graphic card, but just operates "off screen". I heard that many use it
> as a way to have Imaging functionality without opening a real X11
> display!
> 
> > There's no real problem to update my classes to use JAI.
> 
> Good... Can we pick out the old draft we had for specifying how raster
> images are composed in XML? Stefano, do you still have it?

Here it comes, my lord :)

Attached you find a _very raw_ outline of what Pier and I designed as
"NRG - Nestable Raster Graphics" (pronounced "energy").

It takes some ideas and patterns from Adobe Photoshop layers as well as
some ideas from stackable-nestable operations (like Kinetix 3D Studio
operation stack), but it's all new stuff and, in our opinion, much more
powerful than other raster formats.

An NRG file is an XML file that describes instructions on how a 2D
canvas should be raster-painted. A sort of raster equivalent of SVG.

This is already implemented in Stylebook and it's used to generate the
images on the sitebar of xml.apache.org.
 
> > > On the other hand, I think JAI needs Java 1.2 and this is the real
> > > bummer, so, for now, I think Jimi is enough for our use.
> >
> > That's why I also search for something like Jimi.... (FOP only needs a 1.1.x
> > JVM)
> 
> The 1.2 AWT is slick... I tried it out to produce images w/ StyleBook
> and it's really great. I know that right now it's a little bit too much
> undeveloped, but I think that in 2/3 months we will have a 1.2 port on
> any major platform... So, it's better starting to consider it...

I'm +0 on this as long as we have image generation support.

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Come to the first official Apache Software Foundation Conference!  
------------------------- http://ApacheCon.Com ---------------------

Re: FOP and images - Jimi

Posted by Pierpaolo Fumagalli <pi...@apache.org>.
Eric SCHAEFFER wrote:
> 
> Great ! I can't try JAI under Linux for now. I've got a lot of problems
> installing X11 with my graphic card (Diamond FireGL 1000 Pro), and my JVM
> (blackdown port) need an X11 server running to open images. As there were
> binaries in the JAI distribution, and only a distribution for Windows or
> Solaris, I thought it coudn't run under Linux...

Tey the XVFB (X Virtual Frame Buffer) server. It doesn't require a
graphic card, but just operates "off screen". I heard that many use it
as a way to have Imaging functionality without opening a real X11
display!

> There's no real problem to update my classes to use JAI.

Good... Can we pick out the old draft we had for specifying how raster
images are composed in XML? Stefano, do you still have it?

> > On the other hand, I think JAI needs Java 1.2 and this is the real
> > bummer, so, for now, I think Jimi is enough for our use.
> 
> That's why I also search for something like Jimi.... (FOP only needs a 1.1.x
> JVM)

The 1.2 AWT is slick... I tried it out to produce images w/ StyleBook
and it's really great. I know that right now it's a little bit too much
undeveloped, but I think that in 2/3 months we will have a 1.2 port on
any major platform... So, it's better starting to consider it...

	Pier


Re: FOP and images - Jimi

Posted by Eric SCHAEFFER <es...@posterconseil.com>.
----- Original Message -----
From: Stefano Mazzocchi <st...@apache.org>
To: <fo...@xml.apache.org>
Sent: Wednesday, January 05, 2000 2:49 PM
Subject: Re: FOP and images - Jimi


> Eric SCHAEFFER wrote:
> >
> > Hie,
> >
> > I've been working on a (personnal) project to create charts. I use Jimi
> > (http://java.sun.com/products/jimi/) to encode the images, and it works
fine
> > (I began to use JAI, but I wanted my project to work under Windows and
Linux
> > and Linux JAI port isn't ready yet).
>
> Look again. JAI is 100% pure + native speedups for Windows/Solaris. Have
> you tried using it under linux? it works.

Great ! I can't try JAI under Linux for now. I've got a lot of problems
installing X11 with my graphic card (Diamond FireGL 1000 Pro), and my JVM
(blackdown port) need an X11 server running to open images. As there were
binaries in the JAI distribution, and only a distribution for Windows or
Solaris, I thought it coudn't run under Linux...

There's no real problem to update my classes to use JAI.

>
> > I've created a image class in FOP to use Jimi, because it support a lot
of
> > image format (BMP, PNG, TGA, TIFF and others). I need to continue my
work
> > (handling errors, modify FopImageFactory class, etc.), but I'd like to
know
> > if you're interrested in using it.
>
> Of course, I am :)
>
> > Jimi runs under java 1.1.x and is very simple, but I don't know if it
can be
> > included in module dependencies (licencing problems). If you know
another
> > library to encode images that is free, let me know...
>
> I think we should aim to JAI since this is where Sun is going. Jimi is
> already a dead branch, plus, JAI is a _way_ better architecture.
>
> On the other hand, I think JAI needs Java 1.2 and this is the real
> bummer, so, for now, I think Jimi is enough for our use.

That's why I also search for something like Jimi.... (FOP only needs a 1.1.x
JVM)

>
> As for distribution, it's not a big problem if we make people that need
> image capabilities download their own packages. True, it's a pain, but
> there's nothing we can do about those legal craps.
>
> --
> Stefano Mazzocchi      One must still have chaos in oneself to be
>                           able to give birth to a dancing star.
> <st...@apache.org>                             Friedrich Nietzsche
> --------------------------------------------------------------------
>  Come to the first official Apache Software Foundation Conference!
> ------------------------- http://ApacheCon.Com ---------------------
>
>

_______________________________________

Eric SCHAEFFER
eschaeffer@posterconseil.com

POSTER CONSEIL
118 rue de Tocqueville
75017 PARIS
FRANCE
Tel. : 33-140541058
Fax : 33-140541059
_______________________________________



Re: FOP and images - Jimi

Posted by Stefano Mazzocchi <st...@apache.org>.
Eric SCHAEFFER wrote:
> 
> Hie,
> 
> I've been working on a (personnal) project to create charts. I use Jimi
> (http://java.sun.com/products/jimi/) to encode the images, and it works fine
> (I began to use JAI, but I wanted my project to work under Windows and Linux
> and Linux JAI port isn't ready yet).

Look again. JAI is 100% pure + native speedups for Windows/Solaris. Have
you tried using it under linux? it works.

> I've created a image class in FOP to use Jimi, because it support a lot of
> image format (BMP, PNG, TGA, TIFF and others). I need to continue my work
> (handling errors, modify FopImageFactory class, etc.), but I'd like to know
> if you're interrested in using it.

Of course, I am :)
 
> Jimi runs under java 1.1.x and is very simple, but I don't know if it can be
> included in module dependencies (licencing problems). If you know another
> library to encode images that is free, let me know...

I think we should aim to JAI since this is where Sun is going. Jimi is
already a dead branch, plus, JAI is a _way_ better architecture.

On the other hand, I think JAI needs Java 1.2 and this is the real
bummer, so, for now, I think Jimi is enough for our use.

As for distribution, it's not a big problem if we make people that need
image capabilities download their own packages. True, it's a pain, but
there's nothing we can do about those legal craps.

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Come to the first official Apache Software Foundation Conference!  
------------------------- http://ApacheCon.Com ---------------------



Re: FOP and images - Jimi

Posted by Eric SCHAEFFER <es...@posterconseil.com>.
It seems great.
But isn't it too complicated for just open images in batch mode (we don't
need an applet) ?

Eric.

_______________________________________

Eric SCHAEFFER
eschaeffer@posterconseil.com

POSTER CONSEIL
118 rue de Tocqueville
75017 PARIS
FRANCE
Tel. : 33-140541058
Fax : 33-140541059
_______________________________________

----- Original Message -----
From: Arved Sandstrom <Ar...@chebucto.ns.ca>
To: <fo...@xml.apache.org>
Sent: Wednesday, January 05, 2000 11:47 AM
Subject: Re: FOP and images - Jimi


> On Tue, 4 Jan 2000, Eric SCHAEFFER wrote:
>
> > I've been working on a (personnal) project to create charts. I use Jimi
> > (http://java.sun.com/products/jimi/) to encode the images, and it works
fine
> > (I began to use JAI, but I wanted my project to work under Windows and
Linux
> > and Linux JAI port isn't ready yet).
> >
> > I've created a image class in FOP to use Jimi, because it support a lot
of
> > image format (BMP, PNG, TGA, TIFF and others). I need to continue my
work
> > (handling errors, modify FopImageFactory class, etc.), but I'd like to
know
> > if you're interrested in using it.
> >
> > Jimi runs under java 1.1.x and is very simple, but I don't know if it
can be
> > included in module dependencies (licencing problems). If you know
another
> > library to encode images that is free, let me know...
> >
> ImageJ is a fast, capable pure-Java image processing library
> (http://rsb.info.nih.gov/ij/index.html). It'll handle a bunch of image
> formats also.
>
> It's certainly worth a look. You may well end up using it even if it isn't
> quite the thing to use with FOP. :-)
>
> I'm interested in anything you develop along these lines.
>
> Arved Sandstrom
>
>


Re: FOP and images - Jimi

Posted by Arved Sandstrom <Ar...@chebucto.ns.ca>.
On Tue, 4 Jan 2000, Eric SCHAEFFER wrote:

> I've been working on a (personnal) project to create charts. I use Jimi
> (http://java.sun.com/products/jimi/) to encode the images, and it works fine
> (I began to use JAI, but I wanted my project to work under Windows and Linux
> and Linux JAI port isn't ready yet).
> 
> I've created a image class in FOP to use Jimi, because it support a lot of
> image format (BMP, PNG, TGA, TIFF and others). I need to continue my work
> (handling errors, modify FopImageFactory class, etc.), but I'd like to know
> if you're interrested in using it.
> 
> Jimi runs under java 1.1.x and is very simple, but I don't know if it can be
> included in module dependencies (licencing problems). If you know another
> library to encode images that is free, let me know...
> 
ImageJ is a fast, capable pure-Java image processing library
(http://rsb.info.nih.gov/ij/index.html). It'll handle a bunch of image
formats also.

It's certainly worth a look. You may well end up using it even if it isn't
quite the thing to use with FOP. :-)

I'm interested in anything you develop along these lines.

Arved Sandstrom