Page 1 of 1

Compositing 48 with 24 bit

Posted: February 5th, 2011, 5:30 am
by tomczak
Dan asked it in passing in another posting - this is interesting, at least theoretically:

What happens when a 48bit image is composited with a 24bit one: the result is a 48bit image that looks like the overlay, but the colour precision is actually 24bit still not 48, right?

What happens mathematically when a 24bit image is subtracted from a true 48bit one?

Re: Compositing 48 with 24 bit

Posted: February 5th, 2011, 8:00 pm
by jsachs
When compositing 24-bit and 48-bit images, the result is always a 48-bit image, regardless of which is the base and which is the overlay image. The 24-bit image is automatically converted to 48-bit before compositing.

Re: Compositing 48 with 24 bit

Posted: February 6th, 2011, 6:12 am
by tomczak
And the automatic 24 to 48 bit conversion fills the lower bits with zeros, not random bits, right?

Re: Compositing 48 with 24 bit

Posted: February 6th, 2011, 7:36 am
by jsachs
Not quite - conversion to the closest value is done by table lookup where v16 = (65535*(v8+127))/255 - conversion the other way is done by: v8 = (255*v16 + 32767)/65535.