Adding support for mso attribute 'thresh' in black/white images

Xisco Fauli xiscofauli at
Thu Oct 3 08:08:18 UTC 2019


the OOXML format has the attribute 'thresh' in <a:biLevel> element for
specifying the threshold value for luminance in black/white effect for

Right now, LibreOffice just ignores this attribute as the threshold is
hardcoded to 50% here

However, MSO allows the users to change the threshold to 25% or 75%, so
when LibreOffice imports those images, they have a 50% threshold and it

My question is, once the value is parsed in,
what would be the best way to have it in vcl ? should I just do the same
we do with luminance or contrast and have a property called
'AdjustThreshold' or is there any other easier way to do it? I'm asking
because luminance and contrast are used throughout the code and this
solution seems like using a sledgehammer to crack a nut as the threshold
value won't be used anywhere else.


Xisco FaulĂ­
Libreoffice QA Team
IRC: x1sc0

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the LibreOffice mailing list