Value range of c3DSpecularAmt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all, hi Miklos,

MS Office uses value 80000/65536 ≈ 1.22 for attribute c3DSpecularAmt. The specification reads, "c3DSpecularAmt (4 bytes): A value of type FixedPoint, as specified in [MS-OSHARED] section 2.2.1.6, that specifies the ratio of incident to specular light that is reflected on a shape." The corresponding ODF attribute is draw:extrusion-specularity. That has a data type zeroToHundredPercent. So we cannot write the imported 122% to ODF. But currently LibreOffice writes 122% to file and so produces invalid files.

When the shape is rendered, the product of light intensity and specularity is converted to a gray color for the 3D-Scene attribute D3DMaterialSpecularIntensity. Because the light intensity is often smaller than 100% a value for c3DSpecularAmt larger than 100% can be used meaningful.

The range to [0%,100] has been introduced with [Office-2509] for ODF 1.2. In ODF 1.1 the data type was "percent".

What to do?

My suggestion is: Allow larger values than 100% in LibreOffice. Clamp the value to 100% in case of writing ODF 1.2 and 1.3 strict and use loext in case of ODF 1.2 and 1.3 extended. And write to ODF TC to re-enable values larger than 100% for ODF 1.4.

What do you think?

[1] https://issues.oasis-open.org/browse/OFFICE-2509

Kind regards,
Regina



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux