Article View: borland.public.jbuilder.java.api
Article #1255Re: Java 2D vs. JAI vs. Image I/O?
From: John McGrath TeamB
Date: Fri, 15 Mar 2002 08:35
Date: Fri, 15 Mar 2002 08:35
70 lines
4023 bytes
4023 bytes
On Tue, 12 Mar 2002 10:19:12 -0600, ezanga wrote:
> The Java 2D package seems fairly limited (but I know it is
> supported in JDK 1.3.1 and on Mac OS 10), and I would like
> to use many of the features of the Java Advanced Imaging API
> and/or the Image I/O packages, but I am confused about their
> support under JDK 1.3.1 and Mac OS 10.
JAI is supported on JDK 1.2, and the latest release requires JDK 1.3
or higher, so it will run on JDK 1.3.1.
As for OS X, it is not currently supported by Sun. It does contain a
native library, and Windows DLLs or Unix .so files will not run on the
Mac (obviously). The following seems to indicate that it may be able
to run on the Mac without the native code, but my guess is it would be
very slow.
[ http://java.sun.com/products/java-media/jai/forDevelopers/jaifaq.html
When will Java Advanced Imaging run on my Macintosh?
Sun and Apple are working towards an agreement regarding this.
At this time, there is nothing to report. However, some users
have been able to get JAI to run on Mac OS X, but downloading
pure Java version of JAI and then placing the jar files in the
proper locations. However, this is not supported and is not
accelerated to take advantage of the architecture of the Mac.
I guess the best place to look for more information would be the Mac
java-dev mailing list.
> Lastly, I would like to be able to support the following image
> file types: BMP, JPG, GIF, EPS, PSD (adobe Photoshop), AI (Adobe
> Illustrator), PNG, PICT, PCX, QK (Quark Express), and TIF.
> I realize that there is nothing out there that supports all these
> formats, but what would anyone recommend using if I wanted to
> (or if its even possible) develop support for any file formats
> that are not currently supported.
JAI will handle BMP, JPG, GIF, PNG, and TIFF.
I have seen at least one public domain library that will handle PICT
files. I would not be surprised if Apple had one too. I think PCX
is a simple raster format, so that would be pretty easy to write the
code to handle them. It also means that there is free code available
for reading them.
As for the vendor specific formats, you may want to check with the
particular vendors to see if they have Java classes for reading them.
I know that Adobe provides classes for displaying PDF files, so they
might have such classes for their other file formats.
EPS files are going to be tough, depending on the environment. Rather
than contain an actual image, they actually contain PostScript code to
generate an image, so you would need a PostScript interpreter to render
them. However, EPS files often contain an embedded low-res TIFF image,
so depending on the code that is generating the EPS files, you may be
able to just use the embedded TIFF. Note that I said *often* contains
a TIFF image. Some programs do not store a TIFF in the EPS file.
Good luck.
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID:
<MPG.16fb7c5172bdec7498b43f@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!62.24.128.9.MISMATCH!news-1.opaltelecom.net!newsfeed.icl.net!opentransit.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!dnewsReferences:
<3c8e2b20$1_2@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,7c633da0782cfd48 X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2002-03-15 00:39:42 PST From: John McGrath [TeamB] <ng-b@JPMcGrath.net> Newsgroups: borland.public.jbuilder.java.api Subject: Re: Java 2D vs. JAI vs. Image I/O? Date: Fri, 15 Mar 2002 03:35:32 -0500 Message-ID: <MPG.16fb7c5172bdec7498b43f@newsgroups.borland.com> References: <3c8e2b20$1_2@dnews> X-Newsreader: MicroPlanet Gravity v2.60 NNTP-Posting-Host: 209.92.40.60 X-Trace: dnews 1016181339 209.92.40.60 (15 Mar 2002 00:35:39 -0800) Lines: 70 X-Authenticated-User: jpmcgrath Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!62.24.128.9.MISMATCH!news-1.opaltelecom.net!newsfeed.icl.net!opentransit.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!dnews