If it is done correctly (ie linearly), there is no problem with extending
the 12-bit data to 16-bit for storage. What you need to do is use a format
like PNG when storing the image, and put in an sBIT chunk, which records the
number of significant bits in the original image (in this case 12), and then
you can always get the original data back if you need to.
If you are doing things like adding images together, just assuming that 12
bits is better than the stored 16 bits is pointless, because if you are
adding more than 16 images or doing other mathematical operations you will
overflow anyways, and you are probably better off using a 32-bit fixed point
representation anyways. The important thing is that you know what bit-depth
the original data was in, and the back-end will know this, and the front-end
should save it. PNG does this, and it is being used for medical image storage.
Cheers, Andreas
-- Andreas Dilger University of Calgary \"If a man ate a pound of pasta and Micronet Research Group \ a pound of antipasto, would they Dept of Electrical & Computer Engineering \ cancel out, leaving him still http://www-mddsp.enel.ucalgary.ca/People/adilger/ hungry?" -- Dogbert
-- Source code, list archive, and docs: http://www.mostang.com/sane/ To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com