Adjusting 8bit to 'level' and compose properly into 16bit range
Posted: 2019-02-15T09:39:58-07:00
This is more of a hypothesis looking for advice than an issue, since I'm not even sure where to begin...
I'm wanting to take a heap of grayscale 8-bit images and layer them on top of each other by using 'compose add' into a 16-bit grayscale, but I want to make sure those 256 colours are a consecutive 256 range of grays out of 65536. What I mean is, it should be a range like 0-255/65536 (instead of 256 steps of gray between each pixel), and when I use 'compose add' in 16-bit, 2 of them would equal a range of 512, 4 of them 1024, 8 of them 2048, etc.
Ideally the limit of layers to compose would be 8, so specifically I'm looking at trying to make sure the 256 range of 8-bit grays (0-255) equate to a 16-bit range of 0-8191 (a maximum gray equal to that of 32 in 8-bit), if my math is correct, that should mean 'compose add' on those 8 images would give me the full range of 16-bit from pure black to pure white. It should mean, what used to take 256 pixels to have unique columns/rows of grays could now be 2048 and still be unique, without any banding. My method to avoid banding would involve some blur and some roll offset of each image, which should do the trick.
So I guess the first step is converting my 8-bit grayscales to 16-bit and then adjusting the colour correctly, and since I can't see the result because everything I have is 32-bit display, I need some verbose output to see the amount of colours used and the range of brightness from lowest to highest value. I also need to lower my gamma/luminance by a 12.5% exactly after converting to 16-bit, but I'm not sure what I should be looking at since I don't want to plateau my black. Since there is no "luminance" literally I can only think of inverting the colours and then playing with gamma.
So first of all, any advice about getting that range of gray down to 12.5% without losing any information, that would be great. Based on my experience, it's really hard to find something that operates like the "luminance" method I'm used to in Paint Shop Pro, where it adjusts brightness with a bias on white over black, so black would never plateau and bleed out. I think "intensity" is what I'm after but that still goes over my head for now.
Secondly, once I have done that, how to exactly check that the image is okay since I can't actually see it? Just running it through identify seems to give me the min and max but still not entirely sure how to see the exact amount of unique colours used. If correct, I guess it should read "min: 0 (0), max: 8191 (12.5)", and if I can find out it's exactly 256 colours then all should be well. Then, after applying some blur, that amount of unqiue colours should boost from 255 to somewhere upward of 8000, and I'd be ready to roll and compose.
Thanks for any advice about this, I'm sure I'd still be here busy blindly toying with gamma/modulate/levels/etc.
I'm wanting to take a heap of grayscale 8-bit images and layer them on top of each other by using 'compose add' into a 16-bit grayscale, but I want to make sure those 256 colours are a consecutive 256 range of grays out of 65536. What I mean is, it should be a range like 0-255/65536 (instead of 256 steps of gray between each pixel), and when I use 'compose add' in 16-bit, 2 of them would equal a range of 512, 4 of them 1024, 8 of them 2048, etc.
Ideally the limit of layers to compose would be 8, so specifically I'm looking at trying to make sure the 256 range of 8-bit grays (0-255) equate to a 16-bit range of 0-8191 (a maximum gray equal to that of 32 in 8-bit), if my math is correct, that should mean 'compose add' on those 8 images would give me the full range of 16-bit from pure black to pure white. It should mean, what used to take 256 pixels to have unique columns/rows of grays could now be 2048 and still be unique, without any banding. My method to avoid banding would involve some blur and some roll offset of each image, which should do the trick.
So I guess the first step is converting my 8-bit grayscales to 16-bit and then adjusting the colour correctly, and since I can't see the result because everything I have is 32-bit display, I need some verbose output to see the amount of colours used and the range of brightness from lowest to highest value. I also need to lower my gamma/luminance by a 12.5% exactly after converting to 16-bit, but I'm not sure what I should be looking at since I don't want to plateau my black. Since there is no "luminance" literally I can only think of inverting the colours and then playing with gamma.
So first of all, any advice about getting that range of gray down to 12.5% without losing any information, that would be great. Based on my experience, it's really hard to find something that operates like the "luminance" method I'm used to in Paint Shop Pro, where it adjusts brightness with a bias on white over black, so black would never plateau and bleed out. I think "intensity" is what I'm after but that still goes over my head for now.
Secondly, once I have done that, how to exactly check that the image is okay since I can't actually see it? Just running it through identify seems to give me the min and max but still not entirely sure how to see the exact amount of unique colours used. If correct, I guess it should read "min: 0 (0), max: 8191 (12.5)", and if I can find out it's exactly 256 colours then all should be well. Then, after applying some blur, that amount of unqiue colours should boost from 255 to somewhere upward of 8000, and I'd be ready to roll and compose.
Thanks for any advice about this, I'm sure I'd still be here busy blindly toying with gamma/modulate/levels/etc.