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.

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

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.

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

Reply via email to