Is that intended (and only) use of this magic palette?
What relevance is that? Do you question what use every petitioner will put the solution to before you deign to help? Either you have something that will help (and are willing to help me); or you don't, and move on.
As for complicated; if I wanted a half-arsed solution, I had (and demonstrated) that a week ago.
But finding an approach to finding a 'proper' solution makes it an interesting problem. To me at least. I hoped other might also find some joy in considering the matter.
But if joy is too much for you....
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] |
Sorry. They were relevant questions. Is this image good enough for you? I made it with couple lines of Perl from one of those screws. It's indexed, so you can take a look at palette. Which, yes, was extracted from gold ingots from your picture. If you intend to color grayscale images, then OK, it will work. If you meant something more complex (to me - something too much complex), though then I don't understand why you limit yourself to 256 shades, then OK, it won't work.
Edit:
pdl> ( $im, $palette ) = rimage( 'test2.png', { palette => 1 })
pdl> $x = sequence( 255 )-> dummy( 0, 100 )-> byte
pdl> $x-> wimage( 'grad.png', { palette => $palette })
Actually this then "grad.png" is exact solution to the problem as stated in OP:
goal is to reduce those 62770 pixel values to a coherent, progressive, aesthetically pleasing 'gold scale' (after 'greyscale) of 256 values running from black to white, but encompassing as much of the range (nebulous term) of the full dataset as possible. | [reply] [d/l] |
Is this image good enough for you?
Not really as it doesn't address the question I asked.
Your assumption that I want to color that image, is wrong. I want to solve the problem I asked. Once solved it can be used to create a gradient of from any set of input.
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] |