<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hello,</p>
<p>the OOXML format has the attribute 'thresh' in <span
class="elementName"><a:biLevel></span> element for
specifying the threshold value for luminance in black/white effect
for images.</p>
<p>Right now, LibreOffice just ignores this attribute as the
threshold is hardcoded to 50% here
<a class="moz-txt-link-freetext" href="https://opengrok.libreoffice.org/xref/core/vcl/source/gdi/bitmap3.cxx?r=f93a345a#253">https://opengrok.libreoffice.org/xref/core/vcl/source/gdi/bitmap3.cxx?r=f93a345a#253</a></p>
<p>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
<a class="moz-txt-link-freetext" href="https://bugs.documentfoundation.org/show_bug.cgi?id=105380">https://bugs.documentfoundation.org/show_bug.cgi?id=105380</a></p>
<p>My question is, once the value is parsed in
<a class="moz-txt-link-freetext" href="https://opengrok.libreoffice.org/xref/core/oox/source/drawingml/fillproperties.cxx?r=09cd0e36#750">https://opengrok.libreoffice.org/xref/core/oox/source/drawingml/fillproperties.cxx?r=09cd0e36#750</a>,
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.</p>
<p>Regards<br>
</p>
<pre class="moz-signature" cols="72">--
Xisco FaulĂ
Libreoffice QA Team
IRC: x1sc0</pre>
</body>
</html>