Date: prev next · Thread: first prev next last
2019 Archives by date, by thread · List index


Hello,

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

Right now, LibreOffice just ignores this attribute as the threshold is
hardcoded to 50% here
https://opengrok.libreoffice.org/xref/core/vcl/source/gdi/bitmap3.cxx?r=f93a345a#253

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
causes https://bugs.documentfoundation.org/show_bug.cgi?id=105380

My question is, once the value is parsed in
https://opengrok.libreoffice.org/xref/core/oox/source/drawingml/fillproperties.cxx?r=09cd0e36#750,
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.

Regards

-- 
Xisco FaulĂ­
Libreoffice QA Team
IRC: x1sc0


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.