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 Art Welch <ar...@EASTPOINT.COM> on 2000/09/07 02:13:40 UTC

JDK 1.1 and Images EUREKA!!! (commit please)

EUREKA!!!

I have succeeded in getting PDFs produced with BmpImage created images to
work.

I noticed that JimiImage hard-codes m_bitsPerPixel to 8. When I changed
BmpImage to set m_bitsPerPixel to 8 (instead of the original pixel depth) it
works.

If we commit this along with the other changes to support JDK 1.1 then JDK
1.1 users and others who do not want to use Jimi will be able to use Windows
BMP format images. Currently BmpImage only supports monochrome and 24 bit
color BMPs. If anyone is interested, it would be fairly easy to add support
for other BMP sub-formats (just need to add palette support).

To commit this we need to add the attached BmpImage.java file and change
FopImageFactory.java according to the following DIFF:

cvs diff FopImageFactory.java (in directory
C:\latestcvs\xml-fop\src\org\apache\fop\image\)
Index: FopImageFactory.java
===================================================================
RCS file:
/home/cvspublic/xml-fop/src/org/apache/fop/image/FopImageFactory.java,v
retrieving revision 1.10
diff -r1.10 FopImageFactory.java
136c136,144
<       imgClassName = "org.apache.fop.image.JimiImage";
---
> 		try
> 		{
> 			Class test =
Class.forName("com.sun.jimi.core.Jimi");
> 			imgClassName = "org.apache.fop.image.JimiImage";
> 		}
> 		catch ( ClassNotFoundException e )
> 		{
> 			imgClassName = "org.apache.fop.image.BmpImage";
> 		}

*****CVS exited normally with code 1*****


Thank You,
Art (finally with images)

 <<BmpImage.java>> 

Ques about an error...

Posted by Rikard Herlitz <Ri...@excosoft.se>.
What should you look for when you get the mess:

> FATAL ERROR: empty String

not much details...

Also is there a way of making an instream-foreign-object inline?
I need to draw svg-pics inline...

thanks!
/Rikard


Re: JDK 1.1 and Images EUREKA!!! (commit please)

Posted by Eric SCHAEFFER <es...@posterconseil.com>.
Ok, I've tested it, and it works (but only for 24bits images).

Maybe I've done some mistakes with the bitsPerPixel variable, but both
GifJpegImage and JimiImage return me an 24 bits RGB image (that's why I set
the m_bitsPerPixel member variable to 8). The variable name should be
changed...

I've also tested the GifJpegImage class on PNG images (on JDK 1.3), and it
works too.

I''d like to:
 - change the "GifJpegImage" class to "JavaImage" (use java native classes
to read images)
 - add the BmpImage class
 - add a Utils class to the org.apache.fop package (static method to create
a Sax parser)
 - add temporarily a configuration file to the org.apache.fop.image package
for the FopImageFactory

Is there a way to know the JDK version when fop is running ?


----- Original Message -----
From: "Eric SCHAEFFER" <es...@posterconseil.com>
To: <fo...@xml.apache.org>
Sent: Thursday, September 07, 2000 9:47 AM
Subject: Re: JDK 1.1 and Images EUREKA!!! (commit please)


> Ok, I will try it and commit it.
>
> What do you mean by "instead of the original pixel depth" ? Shouldn't it
be
> 8 ?
> (All I can tell on what I've done with the image package is that it works,
> but I'm not sure of all of it...)
>
> PS: I saw in the JDK 1.3 doc that it support PNG. I'll see if we can use
it
> on JDK 1.3 ...
>
> Eric.
>
>
> ----- Original Message -----
> From: "Art Welch" <ar...@EASTPOINT.COM>
> To: <fo...@xml.apache.org>
> Sent: Thursday, September 07, 2000 2:13 AM
> Subject: JDK 1.1 and Images EUREKA!!! (commit please)
>
>
> > EUREKA!!!
> >
> > I have succeeded in getting PDFs produced with BmpImage created images
to
> > work.
> >
> > I noticed that JimiImage hard-codes m_bitsPerPixel to 8. When I changed
> > BmpImage to set m_bitsPerPixel to 8 (instead of the original pixel
depth)
> it
> > works.
> >
> > If we commit this along with the other changes to support JDK 1.1 then
JDK
> > 1.1 users and others who do not want to use Jimi will be able to use
> Windows
> > BMP format images. Currently BmpImage only supports monochrome and 24
bit
> > color BMPs. If anyone is interested, it would be fairly easy to add
> support
> > for other BMP sub-formats (just need to add palette support).
> >
> > To commit this we need to add the attached BmpImage.java file and change
> > FopImageFactory.java according to the following DIFF:
> >
> > cvs diff FopImageFactory.java (in directory
> > C:\latestcvs\xml-fop\src\org\apache\fop\image\)
> > Index: FopImageFactory.java
> > ===================================================================
> > RCS file:
> > /home/cvspublic/xml-fop/src/org/apache/fop/image/FopImageFactory.java,v
> > retrieving revision 1.10
> > diff -r1.10 FopImageFactory.java
> > 136c136,144
> > <       imgClassName = "org.apache.fop.image.JimiImage";
> > ---
> > > try
> > > {
> > > Class test =
> > Class.forName("com.sun.jimi.core.Jimi");
> > > imgClassName = "org.apache.fop.image.JimiImage";
> > > }
> > > catch ( ClassNotFoundException e )
> > > {
> > > imgClassName = "org.apache.fop.image.BmpImage";
> > > }
> >
> > *****CVS exited normally with code 1*****
> >
> >
> > Thank You,
> > Art (finally with images)
> >
> >  <<BmpImage.java>>
> >
>


Re: JDK 1.1 and Images EUREKA!!! (commit please)

Posted by Eric SCHAEFFER <es...@posterconseil.com>.
Ok, I will try it and commit it.

What do you mean by "instead of the original pixel depth" ? Shouldn't it be
8 ?
(All I can tell on what I've done with the image package is that it works,
but I'm not sure of all of it...)

PS: I saw in the JDK 1.3 doc that it support PNG. I'll see if we can use it
on JDK 1.3 ...

Eric.


----- Original Message -----
From: "Art Welch" <ar...@EASTPOINT.COM>
To: <fo...@xml.apache.org>
Sent: Thursday, September 07, 2000 2:13 AM
Subject: JDK 1.1 and Images EUREKA!!! (commit please)


> EUREKA!!!
>
> I have succeeded in getting PDFs produced with BmpImage created images to
> work.
>
> I noticed that JimiImage hard-codes m_bitsPerPixel to 8. When I changed
> BmpImage to set m_bitsPerPixel to 8 (instead of the original pixel depth)
it
> works.
>
> If we commit this along with the other changes to support JDK 1.1 then JDK
> 1.1 users and others who do not want to use Jimi will be able to use
Windows
> BMP format images. Currently BmpImage only supports monochrome and 24 bit
> color BMPs. If anyone is interested, it would be fairly easy to add
support
> for other BMP sub-formats (just need to add palette support).
>
> To commit this we need to add the attached BmpImage.java file and change
> FopImageFactory.java according to the following DIFF:
>
> cvs diff FopImageFactory.java (in directory
> C:\latestcvs\xml-fop\src\org\apache\fop\image\)
> Index: FopImageFactory.java
> ===================================================================
> RCS file:
> /home/cvspublic/xml-fop/src/org/apache/fop/image/FopImageFactory.java,v
> retrieving revision 1.10
> diff -r1.10 FopImageFactory.java
> 136c136,144
> <       imgClassName = "org.apache.fop.image.JimiImage";
> ---
> > try
> > {
> > Class test =
> Class.forName("com.sun.jimi.core.Jimi");
> > imgClassName = "org.apache.fop.image.JimiImage";
> > }
> > catch ( ClassNotFoundException e )
> > {
> > imgClassName = "org.apache.fop.image.BmpImage";
> > }
>
> *****CVS exited normally with code 1*****
>
>
> Thank You,
> Art (finally with images)
>
>  <<BmpImage.java>>
>