imagedata in Word XML

Gordon Tillman got at mindspring.com
Fri Mar 17 15:05:29 EST 2006


Henk I wrote an exporter for JasperReports that can save to WordML  
format.  This is in Java, no no help with RunRev.  But I can tell you  
that the information is not in pure imageData format.  The  
information in WordML is a base-64 encoded PNG or JPEG, or whatever.

Well, even though you decode the information from the WordML file,  
now you have a binary representation of a PNG or JPEG, etc., and that  
is not in a format proper for imageData, which is an array of 4-byte  
integers, each integer representing one pixel.  You will have to  
base-64 decode the information in the WordML file and then read it in  
as if you were reading an image file off a disk, etc.  This will  
decompress the information that is encoded in the file and then you  
can use the result as imageData.

--gordy

On Mar 17, 2006, at 13:50, Henk van der Velden wrote:

> Good day all,
>
> Word 2003 and newer can save as XML. If there is an image in the  
> doc, it's binary data are saved in one of the nodes of an XML tree  
> (body/p/r/pict/binData).
>
> Now I want a Revolution stack to read these XML documents. I  
> assumed the binary image data to be base-64 encoded. But when I  
> decode the content of the node containing the binary image data,  
> and set the imageData of an image in the Rev stack to it, I get a  
> messy picture.
> I have also tried to base-64 encode the imageData of an image in a  
> Rev stack and paste it into a node containing binary image data in  
> a Word XML file. But then Word doesn't understand the data.
>
> Is there anyone who knows how Word's binary image data can be used  
> in Rev?
>
> Kind regards,
> Henk
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list