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


Ah...that didn't strike me...because I assumed it is
again converted back to 8bit by shifting back...which is the case as
well in some functions e.g. GetColor()...but then it doesn't seem to
matter so much as much as for up-sampling.
Thank you for the clarifications.
Yes, 65535/255 or 0xFFFF/0xFF might help.

Thanks again,
Muthu Subramanian

On 12/05/2011 05:12 PM, Tor Lillqvist wrote:
The idea is that the 8-bit input range 0..255 should map to the 16-bit
output range 0..65535 ... Try the original code, compared to your
suggestion;)

(To be honest, multiplying by 257 did sound weird to me, too, but then
I realized that 257 == 65535/255 . I would perhaps write out the
65535/255 explicitly and let the compiler fold it to 257.)

--tml
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice



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.