Re: Tiff with signed samples
Bob Friesenhahn <[email protected]> Tue, 18 Aug 2020 16:58:01 -0500 (CDT)
| Newsgroups | gmane.comp.video.graphicsmagick.help |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 18 Aug 2020, Tom Lechner wrote: > On 8/18/20 6:58 AM, Bob Friesenhahn wrote: >> The 2GB download size seems somewhat prohibitive to easily test with. > Not quite as bad as their 11 GB version! > >> GM's -operator command can be useful such as using the logical And >> operator, as well as the LShift, RShift, and Multiply operators to try to >> convert the data into useful unsigned values. > > Hmm, so what I'm wanting to do is for each pixel value v, make v = (v >> 8) | > (v << 8) That might be reasonable, depending on what the signed values represent. At least it avoids the 'overflow'. With signed values, there might be a 'nominal' measurement value equivalent to 0 with values then appearing above and below that 'nominal' value and scaled to not lose anything important. Another way to do things is to ignore negative values and only use the positive values. > Samples are 16 bit grayscale, and gm quantum depth is 16. > I'm assuming there's no shift-and-wraparound operator. > If I read the docs right, -operator is a single thing done, the original > value is forgotten, so something like that formula wouldn't be possible in a > command line single call? That is true, there is currently no "barrel-shift" type operator (sounds useful!). The operators are indeed very simple such that if multiple factors need to be considered, they should be done in the same operator. The operators only consider the current pixel and the arguments provided. The operator implementation is very simple and it is easy to add additional operators in the C code. > Slightly different question but part of my goal, can gm create normal maps > from heightmaps? Usually gimp or krita do fine for this, but are crashing > with this image for some unknown reason. Maybe they can't handle such a large image. I am not exactly sure what you mean by "create normal maps from heightmaps". Are you able to provide a direct reference to a description so I can see what you are talking about? Bob -- Bob Friesenhahn [email protected], http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/ Public Key, http://www.simplesystems.org/users/bfriesen/public-key.txt