|
|
Alain <kua### [at] videotronca> wrote:
> How can you recolor before saving when the format only support discrete,
> single component, scalar values? That's just not possible.
>
> Remember that DF3s have no concept of colour at all. It's strictly a
> list of 1 dimension values.
Let me give a different example -
If there is a grayscale value, then that must have some range or depth - how
many values?
If it's like a pattern{}, then you can give it a color_map{}.
My idea here, is instead of having the grayscale represent a range of gray from
0 to Max with 1-unit intervals, have it represent an RGB scale from 0 to Max
_STEP 3_. It's a lot rougher, but it encodes full color.
Let's say you've got the usual 0-255 values.
That's 8 bits.
pow(2, 8) = 256
let's use 6 of those bytes, 2 for each color channel
granted, that only gives you 4 levels for each channel, but it's rgb - the data
is there.
The trick is getting more than those 4 levels for each channel squeezed into
those 8 bytes.
But I still think it's a better, faster workflow than what Stephen's currently
doing.
I'm sure some very clever folks have ways that can use 8 bits much more
efficiently to store more data.
There certainly seem to be computer-sciency types who have some ideas:
http://stackoverflow.com/questions/3499444/compress-two-or-more-numbers-into-one-byte
http://mathoverflow.net/questions/69244/encoding-n-natural-numbers-into-one-and-back
https://en.wikipedia.org/wiki/Z-order_curve
https://www.google.com/#q=how+to+encode+data+into+one+number
Post a reply to this message
|
|