Hello,
Im working on svg format exporter, and what I need to do is to export some of AI effects as SVG filters.
I encountered a problem with Effect -> (PhotoshopEffects) Blur -> Gaussian Blur effect.
When getting the effect parameters there is some binary entry in the dictionary and it is not documented naywhere in the docs what type of data it that.
When serializing a document with GaussianBlur effect info fxg foramt, here is what you can find in the xml :
<ai:LiveEffect index="0" major="1" minor="0" name="PSAdapter_plugin_GblR">
<ai:Dict data="B go 1 I PrevDres 300 I dataSize 24 ">
<ai:Entry name="data" value="AAAAAVJkcyAAAAAAZG91Yj/xmZmgAAAA" valueType="N"/>
</ai:Dict>
</ai:LiveEffect>
Attribute value holds the binary data describing the GaussianBlur effect with radius set to 1,1 value.
Can anybody tell how to decode the binary data so that I could dig out the radius value from it?
Thanks in advance,
Rafał
Ok, I found the problem so will leave the solution, maybe somebody will also need this.
So the value attribute value="AAAAAVJkcyAAAAAAZG91Yj/xmZmgAAAA" is base64 encoded.
When decoded it presents sth like this, where dots "." are zeros (actually below presented data represents gaussian blur effect data for radius == 2, not 1,1 like in previous post):
....Rds ....doub@.......
this is same data in hex
00 00 00 01 52 64 73 20 00 00 00 00 64 6f 75 62 40 00 00 00 00 00 00 00
and last 8 bytes represents a double number in big endian:
@....... == 40 00 00 00 00 00 00 00
Im working on windows, so after switching it to little endian we get
.......@ or 00 00 00 00 00 00 00 40
which is our radius in double format.
To be more precise the initial number in the binary data is typeIEEE64BitFloatingPoint, and can be googled in some Python/Apple's header files, here for instance http://svn.python.org/projects/python/trunk/Lib/plat-mac/Carbon/AppleE vents.py.
Cheers ![]()
North America
Europe, Middle East and Africa
Asia Pacific