On Sun, 2002-04-28 at 16:52, Drew Varner wrote:
> I am not sure where the functionality would be used elsewhere. Since WMF is 
> just a byte[], we can use it anywhere without AWT ties. If you want to actually 
> view it, you'll need the Batik code. However, the fact that there can't be AWT 
> ties seems to get rid of the need for rasterizing WMF images.
> 

okay

> <rant>
> Now, passing around a WMF image as a byte[] is really useless. If POI is "for 
> manipulating various file formats based upon Microsoft's OLE 2 Compound 
> Document format using pure Java" (POI Purpose - Web Page), we don't allow the 

notice this doesn't say "Display"

> user to do this with thumbnails. Yes, they can "manipulate" the WMF image by 
> copying it or saving it, but those are not useful manipulations. Wait, those 
> are not manipulations. Seems like keeping a WMF image in a byte[] is keeping a 
> Microsoft file in a format Java can't understand. Isn't the purpose of POI to 
> allow Java to "understand" Microsoft formats? I see some irony here. We could 
> simply pass an Excel file around as a byte[], right? But, that has already been 
> decided, so...
> </rant>
> 

Well WHAT can you do with the WMF?  The POI kind of thing to do with it
would be to read one and provide an API for manipulating it, create one
from scratch and provide an API for manipulating it.  But I agree this
seems to be basically a Batik overlap and maybe we can just depend on
Batik for graphic formats and POI can do the specifics for storing it
for a given format.  (Storing an image in HSSF is non-trivial).

POI isn't an API for viewing the formats, its for creating, parsing,
modifying.  Go write a Spreadsheet and use POI for the Excel
compatibility for instance.  We're not really here to make GUI apps.  

(Though I now would find it useful if someone wrote a Java spreadsheet
that could read/write XLS using POI) -- We will take things like that in
contrib.  Just Jakarta = Server-side java.

> I think the code to extract a WMF image as a byte[] is appropriate for HSPF as 
> a convenience method. I think additional (and prerequisite to WMF extraction) 
> methods are needed to identify the clipboard format:
> 
> 1) Windows Clipboard
> 2) Mac Clipboard
> 3) Custom
> 4) No data (almost never used)
> 
> Then, if it is Windows Clipboard data, identify it as:
> 
> 1) Clipboard Metafile Format
> 2) Device Independent Bitmap (DIB)
> 
> I'll need to see if I can find references on exctracting DIB images later, 
> though it should be uncommon.
> 
> HIF. Most Microsoft formats can be read into Java already. WMF can be read 
> using Batik. I don't see what it buys us. If I had to develop it for headless 
> servers, no thanks. What is appropriate is to ask Batik to put the WMF 
> rasterizing classes into the Commons. It'd be a small, modular component useful 
> in applications that need to use and <rant>manipulate</rant> OLE2 data.
> 

OR maybe Batik should move that to POI and use POI for doing the lifting
with some useful classes for manipulating Images without X.  Just
thinking out loud.  You seem to have stronger opinions all of this than
I do.  Remember POI's being used by Banks and other folks on servers
that may or may not be graphical in nature.  In fact one gentleman is
using it on an AS400 and would have to serial to a PC to call to AWT for
instance.  Saying 1.4 will fix it all is a bit well...improper.  Most
folks won't be switching (and rightly so) to 1.4 until its had time to
bake (read: they fix all the really STUPID bugs).  Just because this is
not a requirement for you doesn't mean its not important.  You speak of
reinventing the wheel, I'm willing to reinvent the wheel to be round
instead of square (like the one Sun seems to have invented in this
case).

Image stuff will soon be a bigger issue when HSSF and HDF start
reading/writing them.  I guess I'll probably write a headless image
properties manipulator (if needed).  

Anyhow...back to HSSF formulas.  Keep coding and having fun.  Chin up
its only life.

-Andy

> -Drew
> 
> Quoting "Andrew C. Oliver" <[EMAIL PROTECTED]>:
> > Consider whether this code is an appropriate addition to HPSF or if it
> > might be a component in and of itself HIF or whatever.  Meaning we'll
> > probably need WMF formats in HDF and HSSF, is there common functionality
> > here that applies to all three?  (Just asking)
> ___________________
> Drew Varner
> [EMAIL PROTECTED]
-- 
http://www.superlinksoftware.com
http://jakarta.apache.org/poi - port of Excel/Word/OLE 2 Compound
Document 
                            format to java
http://developer.java.sun.com/developer/bugParade/bugs/4487555.html 
                        - fix java generics!
The avalanche has already started. It is too late for the pebbles to
vote.
-Ambassador Kosh

Reply via email to