I think he might mean prior to PGM:-magick wrote:Add '-compress none' to your command line.
But I am not an expert on this. Anthony is the real expert on NetPBM
I think he might mean prior to PGM:-magick wrote:Add '-compress none' to your command line.
So I think you still need to manually set the max value.Anthony wrote:IM netpbm output is limited to 8 and 16 bit depth. setting the Maxval Netpbm setting is an option i would like to see added to the netpbm coder.
Anthony is best to consult about this. He pointed out earlier that IM is limited to setting the max value to 2^N-1.Raconteur wrote:I figured as much, but it seemed as though we were getting to a way of doing it. Even if I could do the -evaluate divide 17 trick, and then in another convert statement change the maxgray value, I could put that into a script and have my people run that.
Code: Select all
convert -size 1x16 gradient: -compress none -depth 4 pgm:-
As you can see the result was depth 8 (maxval = 2^8-1 => 255)P2
1 16
255
255 238 221 204 187 170 153 136 119 102 85 68 51 34 17 0
Code: Select all
convert -size 1x16 gradient: +depth +level 0,15 -compress none PGM:-
Then replace the third line with a new maxval value of 15P2
1 16
65535
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Code: Select all
convert -size 1x16 gradient: -depth 16 PGM:- | pamdepth 15 | pnmtopnm -plain
P2
1 16
15
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0