bpp (colour depth)

Started by Malko on 28-Mar-2015/20:34:22-7:00
Hello, A year ago, I asked about a a simple 'rebol only' way to know the 'bpp' of an image (colour depth). Recently, I found this interesting article : http://www.hsc.csu.edu.au/ipt/mm_systems/3289/image_file_size.htm Based on that article, it is possible to estimate the bpp of an image like : img: load %image.png sze: size? %image.png x: img/size/x y: img/size/y bpp: ((sze * (8 * 1024)) / (x * y)) / 1000
I would at least replace sze: size? %image.png by sze: length? img This way you get the size of the image as not compressed. The file size is not relevant as we have no idea how much it has been compressed.
I red and quick tested in night-session time on uncompressed picture (with half-closed eyes (and brain)... ;) ;) . Thanks for the precision/correction.

Reply