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 > _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice