indexed 1-bit png is negated
Posted: 2015-06-05T13:41:11-07:00
Dear All,
If I run (on Windows 7 / ImageMagick 6.9.1-3 Q16 x86 portable)
"convert input.png -depth 1 -define png:color-type=3 output01.png" and
"convert input.png -depth 1 -negate -define png:color-type=3 output02.png"
I get two images that look the same (in my case input.png is already 1-bit / indexed); the Problem is neither there with color-type=2 nor with tif, but somehow with indexed png + 1-bit color-depth ...
identify -verbose input.png is:
Colors: 2
Histogram:
1144010: ( 0, 0, 0) #000000 gray(0)
12932969: (255,255,255) #FFFFFF gray(255)
Colormap entries: 2
Colormap:
0: (255,255,255) #FFFFFF gray(255)
1: ( 0, 0, 0) #000000 gray(0)
identify -verbose output01.png is:
Colors: 2
Histogram:
12932969: ( 0, 0, 0) #000000 gray(0)
1144010: (255,255,255) #FFFFFF gray(255)
Colormap entries: 2
Colormap:
0: (255,255,255) #FFFFFF gray(255)
1: ( 0, 0, 0) #000000 gray(0)
identify -verbose output02.png is:
Colors: 2
Histogram:
12932969: ( 0, 0, 0) #000000 gray(0)
1144010: (255,255,255) #FFFFFF gray(255)
Colormap entries: 2
Colormap:
0: ( 0, 0, 0) #000000 gray(0)
1: (255,255,255) #FFFFFF gray(255)
"mogrify -define png:color-type=3 output01.png" somehow it adds a color map entry / "identify -verbose output01.png (neu)" is:
Colors: 2
Histogram:
12932969: ( 0, 0, 0) #000000 gray(0)
1144010: (255,255,255) #FFFFFF gray(255)
Colormap entries: 3
Colormap:
0: ( 0, 0, 0) #000000 gray(0)
1: (255,255,255) #FFFFFF gray(255)
2: (254,254,254) #FEFEFE gray(254)
If I run (on Windows 7 / ImageMagick 6.9.1-3 Q16 x86 portable)
"convert input.png -depth 1 -define png:color-type=3 output01.png" and
"convert input.png -depth 1 -negate -define png:color-type=3 output02.png"
I get two images that look the same (in my case input.png is already 1-bit / indexed); the Problem is neither there with color-type=2 nor with tif, but somehow with indexed png + 1-bit color-depth ...
identify -verbose input.png is:
Colors: 2
Histogram:
1144010: ( 0, 0, 0) #000000 gray(0)
12932969: (255,255,255) #FFFFFF gray(255)
Colormap entries: 2
Colormap:
0: (255,255,255) #FFFFFF gray(255)
1: ( 0, 0, 0) #000000 gray(0)
identify -verbose output01.png is:
Colors: 2
Histogram:
12932969: ( 0, 0, 0) #000000 gray(0)
1144010: (255,255,255) #FFFFFF gray(255)
Colormap entries: 2
Colormap:
0: (255,255,255) #FFFFFF gray(255)
1: ( 0, 0, 0) #000000 gray(0)
identify -verbose output02.png is:
Colors: 2
Histogram:
12932969: ( 0, 0, 0) #000000 gray(0)
1144010: (255,255,255) #FFFFFF gray(255)
Colormap entries: 2
Colormap:
0: ( 0, 0, 0) #000000 gray(0)
1: (255,255,255) #FFFFFF gray(255)
"mogrify -define png:color-type=3 output01.png" somehow it adds a color map entry / "identify -verbose output01.png (neu)" is:
Colors: 2
Histogram:
12932969: ( 0, 0, 0) #000000 gray(0)
1144010: (255,255,255) #FFFFFF gray(255)
Colormap entries: 3
Colormap:
0: ( 0, 0, 0) #000000 gray(0)
1: (255,255,255) #FFFFFF gray(255)
2: (254,254,254) #FEFEFE gray(254)