Coloration of black/white picture after resize
Posted: 2011-04-23T06:48:13-07:00
Hello all.
Sorry for my english (I french).
I use IM to color a picture. This picture has a pgm format. (the picture : http://88.190.18.22/img.pgm)
I execute this command line : convert img.pgm -filter Mitchell -resize 1026x864! img2.pgm
After, I build my coloration legend :
And, I use the -clut option for coloration : convert img2.pgm legend.png -interpolate Integer -clut img3.png
I obtain this picture : http://88.190.18.22/img3.png, and with values : http://88.190.18.22/img3Val.png
I've a problem. If I've 3 values as that : 3 6 6, the coloration pass by 5 values : 3 (4) (5) 6 6. Clearly seen on the image with the orange color that does all the edges so there is not value 4. How resolve this problem ? It's possible ?
Thinks a lot for you help.
Guillaume C.
Sorry for my english (I french).
I use IM to color a picture. This picture has a pgm format. (the picture : http://88.190.18.22/img.pgm)
I execute this command line : convert img.pgm -filter Mitchell -resize 1026x864! img2.pgm
After, I build my coloration legend :
Code: Select all
convert -size 9x2 xc: -draw '
fill #ffffff rectangle 0,0 9,2
fill #8bff00 rectangle 1,0 9,2
fill #858348 rectangle 2,0 9,2
fill #ff1c00 rectangle 3,0 9,2
fill #ff6e00 rectangle 4,0 9,2
fill #006599 rectangle 5,0 9,2
fill #4c9900 rectangle 6,0 9,2
fill #990097 rectangle 7,0 9,2
fill #636363 rectangle 8,0 9,2 ' legend.png
I obtain this picture : http://88.190.18.22/img3.png, and with values : http://88.190.18.22/img3Val.png
I've a problem. If I've 3 values as that : 3 6 6, the coloration pass by 5 values : 3 (4) (5) 6 6. Clearly seen on the image with the orange color that does all the edges so there is not value 4. How resolve this problem ? It's possible ?
Thinks a lot for you help.
Guillaume C.